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

Apostrophes in links don't get parsed correctly #314

Closed
repsorp opened this issue Jan 1, 2018 · 5 comments
Closed

Apostrophes in links don't get parsed correctly #314

repsorp opened this issue Jan 1, 2018 · 5 comments

Comments

@repsorp
Copy link

repsorp commented Jan 1, 2018

URL's with apostrophe character (') are broken in preview mode.

For example:
http://en.wikipedia.org/wiki/Conway's_Game_of_Life

Enclosing URLs in angle brackets (RFC 2396) doesn't work here

Android 7.1.2
nextcloud-notes v0.12.1

@stefan-niedermann
Copy link
Member

https://github.com/stefan-niedermann/nextcloud-notes/blob/7ecfac6cdad64d63f0d548c8fb3cfd6435b8595b/app/src/main/java/it/niedermann/owncloud/notes/android/fragment/NotePreviewFragment.java#L65

@korelstar i think we can fix it by adding the ' character to the list here, but there might be more characters which are allowed in URL....

@korelstar
Copy link
Member

Yes, sound reasonable. In general, it's not easy to create a regular expression for detecting URLs without any side-effects. Hence, there will always be a better one, but most cases should be caught with the current one (respectively the new one with the apostroph) ;-)

@korelstar
Copy link
Member

However, it would be advantageous to move that regular expression into a Util class and write a test case for it.

@stefan-niedermann

This comment has been minimized.

@stefan-niedermann
Copy link
Member

We are not doing the linking-part in the Notes app anymore, it happens in the Markdown-rendering lib: yydcdut/RxMarkdown@c30609a#diff-62b97722e3e68b869ca54e67daad437eR45

Therefore i opened a new issue upstream: yydcdut/RxMarkdown#62

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

No branches or pull requests

3 participants