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

Linkify treats ideographic space characters as part of URLs #315

Closed
igoshawk opened this issue Feb 25, 2021 · 2 comments
Closed

Linkify treats ideographic space characters as part of URLs #315

igoshawk opened this issue Feb 25, 2021 · 2 comments
Labels
i18n Internationalization
Milestone

Comments

@igoshawk
Copy link

I found this issue when I'm using linkify for URLs in Japanese text and the spaces in Japanese are ideographic spaces (full-width). LinkifyHtml is converting the URL and text with an ideographic space in between as one big URL instead of one URL and text.

The text I'm using:

https://google.com       テスト

The Unicode for ideographic space is \u3000.

Not sure whether the other whitespaces should be treated the same as normal whitespaces, or should be considered as part of the URL.

@nfrasser nfrasser added the i18n Internationalization label Feb 26, 2021
@nfrasser nfrasser mentioned this issue Mar 8, 2021
@nfrasser nfrasser added this to the 3.0 milestone Mar 8, 2021
@toffyui
Copy link

toffyui commented Mar 22, 2021

I think this problem is occurred because linkifyjs is not supported for double-byte whitespaces.
I checked if the problem still happen when I use one-byte whitespace (normal whitespace), then found nothing strange happened.
So you may be able to fix this by writing a regular expression that also takes into account double-byte whitespaces...

@nfrasser
Copy link
Owner

Fixed in v3.0.0 (#318)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Internationalization
Projects
None yet
Development

No branches or pull requests

3 participants