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

[BUG] Comma in Fragment of URL Is Not Being Replaced, Causing Broken Links #3633

Closed
2 tasks done
Shriya-Chauhan opened this issue Jan 31, 2025 · 3 comments · Fixed by #3634
Closed
2 tasks done

[BUG] Comma in Fragment of URL Is Not Being Replaced, Causing Broken Links #3633

Shriya-Chauhan opened this issue Jan 31, 2025 · 3 comments · Fixed by #3634
Labels
bug good first issue Good for newcomers

Comments

@Shriya-Chauhan
Copy link
Contributor

Describe the bug.

When clicking on a link with a fragment that contains a comma (e.g., #call-for-speakers,-singapore), the generated URL is not working correctly. The URL generated is: https://www.asyncapi.com/blog/conference-2024-summary#call-for-speakers,-singapore

However, when manually modifying the URL to replace the comma with a hyphen, the link works as expected: https://www.asyncapi.com/blog/conference-2024-summary#call-for-speakers-singapore

Expected behavior

The URL should automatically replace commas in the fragment with hyphens, resulting in a valid URL like:

https://www.asyncapi.com/blog/conference-2024-summary#call-for-speakers-singapore

Screenshots

Screencast.from.01-31-2025.11.00.17.AM.webm

How to Reproduce

Steps to Reproduce:
-Go to https://www.asyncapi.com/blog/conference-2024-summary

🥦 Browser

Google Chrome

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

@Shriya-Chauhan
Copy link
Contributor Author

Shriya-Chauhan commented Jan 31, 2025

@anshgoyalevil Please take a look. Let me know if I can work on this.

@anshgoyalevil anshgoyalevil added the good first issue Good for newcomers label Jan 31, 2025
@anshgoyalevil
Copy link
Member

Feel free to raise the PR.

IMO, That would require a minor change to the regex over here

.replace(/[<>?!:`'."\\/=]/gi, '')

@Shriya-Chauhan
Copy link
Contributor Author

Oh yes, this file, thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants