Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-ASCII alphabets are converted to "-" during import #2693

Open
2 tasks done
hrmon opened this issue Jul 23, 2024 · 2 comments
Open
2 tasks done

Non-ASCII alphabets are converted to "-" during import #2693

hrmon opened this issue Jul 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@hrmon
Copy link

hrmon commented Jul 23, 2024

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

When importing a collection, a function named normalizeFileName is applied to the items' names. This function uses this replacement:

// Remove any characters that are not alphanumeric, spaces, hyphens, or underscores
...
name.replace(/[^\w\s-]/g, '-');

But, this will replace the non-ASCII alphabets (like Persian) with "-". I was wondering why such a normalization is needed at all. If it is necessary, can we make it work with non-ASCII alphabets?

.bru file to reproduce the bug

No response

Screenshots/Live demo link

image

@hrmon hrmon added the bug Something isn't working label Jul 23, 2024
@jwetzell
Copy link
Contributor

Seems to be an intentional choice to limit the supported characters in filenames when importing. Despite the variable in that function being called validChars it's actually a regex that matches "INVALID" characters and replaces them with a hyphen (-)

@hrmon
Copy link
Author

hrmon commented Jul 31, 2024

But the editor allows using such characters. Why is such a limitation only applied when importing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants