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

… is not properly handled #455

Closed
gravelfox opened this issue Oct 31, 2023 · 3 comments · Fixed by #462
Closed

… is not properly handled #455

gravelfox opened this issue Oct 31, 2023 · 3 comments · Fixed by #462

Comments

@gravelfox
Copy link

gravelfox commented Oct 31, 2023

The ampersand in … is re-encoded, which doesn't seem to happen for other html encoded characters, for example the output of:

LinkifyHtml("<p>Here is a link and an extra space: google.com &nbsp;</p><p>Here is a link and a greater-than: google.com &gt;</p><p>Here is a link and an ellipsis: google.com &hellip;</p>");

is:

Here is a link and an extra space: google.com  

Here is a link and a greater-than: google.com >

Here is a link and an ellipsis: google.com &hellip;

This means that while everything else I render as html looks right, an ellipsis ends up looking like &hellip;

I'd love to know if I'm doing something wrong here.

Thanks!

@gravelfox
Copy link
Author

Coming back to this, I have found that this happens for almost all encoded symbols. I will write some workaround function to take care of this in the meantime unless anyone can tell me what I'm doing wrong. As far as I can tell, the only encoded symbols that work are the five in @nfrasser/simple-html-tokenizer/src/generated/html5-named-char-refs.ts, though I haven't taken the time to determine whether that is what is making them work...

@nfrasser
Copy link
Owner

Hi @gravelfox, thanks for reporting. This should be fixed in the latest v4.1.3

@gravelfox
Copy link
Author

Rad, thank you! I am not proud of how hacky my workaround was and will be very happy to back it out!

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

Successfully merging a pull request may close this issue.

2 participants