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

urls with hash part are badly interpreted #223

Open
ziedHamdi opened this issue Apr 1, 2022 · 1 comment
Open

urls with hash part are badly interpreted #223

ziedHamdi opened this issue Apr 1, 2022 · 1 comment

Comments

@ziedHamdi
Copy link

Hi,

I was testing interweave, I found it really smart to have added emoticon detection (I think a default graphical set would make it twice more attractive). But this is not the topic:

I have the following url in my text:

https://uk.blastingnews.com/food-and-wine/2016/08/here-is-why-eating-at-mcdonald-s-is-bad-for-health-001083227.html#:~:text=Their%20fast%20foo
ds%20have%20excessive,obesity%2C%20and%20high%20blood%20pressure.

And only its start (
https://uk.blastingnews.com/food-and-wine/2016/08/here-is-why-eating-at-mcdonald-s-is-bad-for-health-001083227.html#) is interpreted as a url, the rest is a real mess in the text.

So I would recommend two improvements:

  • search for the next '.' or ' ' (space) to consider the url is finished
  • url decode before displaying

Also newWindow shloud be an option of the matcher and not the entire tag in my opinion

Best regards

p.s: there's also an 'over detection' of urls as in the picture because the person who wrote the text didn't put a space after the point in "harm to you.It" so you.it is interpreted as a URL, I think since It is uppercase, we could detect that too

@ziedHamdi
Copy link
Author

Capture d’écran de 2022-04-01 10-31-19

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

No branches or pull requests

1 participant