Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

trivial regression on auto_link for non-western languages

#5503

As auto_link are supporting arbitrary URI schemes since this commit, it now recognizes all the preceding full width characters as a part of URI.
This might not be a bug, but at least a minor specification change for those who read/write languages that don't usually separate words by a space character.

Attached a patch avoiding this tiny regression, with a possible case for eastern people.

Reported by Akira Matsuda · August 30th, 2010 @ 10:08 PM

State: committed
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. bhf
    bhf

    But tnough it can never happen to words like e.g, cheap ephedra

    August 31st, 2010 @ 04:36 PM

  2. Masayoshi Takahashi
    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\. )
    

    September 11th, 2010 @ 06:24 AM

  3. Santiago Pastorino
    Santiago Pastorino
    • Importance changed from to Low

    Akira can you update your ticket according to the RFC?

    January 31st, 2011 @ 10:55 PM

  4. Akira Matsuda
    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?

    January 31st, 2011 @ 11:39 PM

  5. Masayoshi Takahashi
    Masayoshi Takahashi

    I understand Akira's intent. It's OK to support URI format loosely, IMHO.

    February 1st, 2011 @ 12:39 PM

  6. Repository