This project is archived and is in readonly mode.
trivial regression on auto_link for non-western languages
-
bhf
But tnough it can never happen to words like e.g, cheap ephedra
-
Masayoshi Takahashi
In RFC3986, scheme syntax of URI is:
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )http://tools.ietf.org/html/rfc3986#section-3.1
So regexp in the patch should be:
(?: ([A-Za-z][0-9A-Za-z+.-]*:)// | www\. ) -
Santiago Pastorino
- Importance changed from to Low
Akira can you update your ticket according to the RFC?
-
Akira Matsuda
- Tag set to auto_link, edge, patch, tested
No.
I actually tried that regexp but the "view-source:http://en.wikipedia.org/wiki/URI_scheme" one didn't pass the test.
It is obvious that "view-source:http://..." does not follow the RFC, so I think there are two options.1) strictly follow the RFC
Revert the previous commit and drop support for "view-source:http://...", then implement the RFC3986 regexp as Takahashi-san suggested.2) support the RFC + much more schemes
This was the intent of my patch.What do you think?
-
Masayoshi Takahashi
I understand Akira's intent. It's OK to support URI format loosely, IMHO.
-
Repository
- State changed from new to committed
(from [cb9fa5283239e649483ea31ca372e99aaac2ca07]) auto_link: avoid recognizing full width chars as a part of URI scheme
fixes regression by http://github.com/rails/rails/commit/133ada6ab0f0cb7bef2bd40dbc18f2...
[#5503 trivial regression on auto_link for non-western languages state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/cb9fa5283239e649483ea31ca372e...
