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

Auto linking URLs doesn't handle non ASCII characters #1389

Closed
Arantor opened this issue Feb 9, 2014 · 0 comments · Fixed by #3573
Closed

Auto linking URLs doesn't handle non ASCII characters #1389

Arantor opened this issue Feb 9, 2014 · 0 comments · Fixed by #3573
Labels

Comments

@Arantor
Copy link
Contributor

Arantor commented Feb 9, 2014

Complex issue.
http://dev.simplemachines.org/mantis/view.php?id=360
http://dev.simplemachines.org/mantis/view.php?id=2449
http://dev.simplemachines.org/mantis/view.php?id=4359
http://www.simplemachines.org/community/index.php?topic=387983

Using the url bbcode is fine, it's merely the auto linking regex.

live627 added a commit to live627/SMF2.1 that referenced this issue May 1, 2014
Sesquipedalian added a commit to Sesquipedalian/SMF that referenced this issue Sep 10, 2016
- Changes the regex to permit Unicode characters in relevant parts of a detected URL. HTML5 supports IRIs, so it is perfectly valid to put UTF8 characters (without percent encoding them) into a web address in an HTML5 document. Whenever an IRI link is encountered, the browser will handle everything that needs to be handled. See http://www.w3.org/International/articles/idn-and-iri/ for more info.
- Removes some calls to filter_var() because FILTER_SANITIZE_URL and FILTER_VALIDATE_URL only support URIs, not IRIs. Since we no longer have the filters in place as a secondary check for invalid URLs, we'll have to rely on the regex alone. But that should be fine; it's no different than the situation prior to commit 8db70d2.

Fixes SimpleMachines#1389

Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant