#66 URLs delimited with < and > are not recognized

open
C L
None
4
2006-01-26
2004-07-31
James McCoy
No

According to RFC 1783, Section 2.2, < and > are the
proper way to delimit URLs in text. X-Chat Aqua
doesn't properly use this information to it's
advantage. The following are some examples:

http://some.domain.com/path/>, <-- This entire string
will be recognized as a link instead of just up to the
final /.

<http://some.domain.com/path/> <-- This works as
expected. Only the actual URL is recognized as a link.

<http://some.domain.com/path/>, <-- Nothing in this
string is recognized as a URL.

<http://some.domain.com/path/ <-- Nothin in this
string is recognized as a URL.

If I get some time, I'll poke around in the code and
see if I can submit a patch.

Discussion

  • James McCoy
    James McCoy
    2004-08-07

    Logged In: YES
    user_id=661047

    Mistyped the RFC number. It's RFC 1738 (Uniform Resource
    Locators).

     
  • C L
    C L
    2006-01-12

    • priority: 5 --> 1
    • status: open --> pending
     
  • C L
    C L
    2006-01-12

    Logged In: YES
    user_id=1425757

    Please download the latest version of XCA and check if the bug you submitted is still
    present; if so, add a comment to this bug report. If there is no response within two
    weeks, the bug will automatically be marked as closed. This has been done to clear the
    database from old bugs which have probably been fixed, which will enable faster
    responses to new bugs.

     
  • James McCoy
    James McCoy
    2006-01-26

    • status: pending --> open
     
  • James McCoy
    James McCoy
    2006-01-26

    Logged In: YES
    user_id=661047

    Yes, this bug still exists. All of the examples exist as noted.

     
  • C L
    C L
    2006-01-26

    • assigned_to: nobody --> cl_
     
  • C L
    C L
    2006-01-26

    Logged In: YES
    user_id=1425757

    Examples 1 and 4 are malformed. Are you suggesting that they should be
    recognized?
    Example 3 will be fixed.

     
  • C L
    C L
    2006-01-26

    • priority: 1 --> 4
     
  • James McCoy
    James McCoy
    2006-01-26

    Logged In: YES
    user_id=661047

    At the very least, I think example 1 should be fixed. '>'
    can't be part of the URL, so '>,' should be recognized as
    part of the URL. Ideally, 4 would be fixed also but I would
    understand the reluctance to do so if it requires special
    handling. I wasn't able to find the proper area of the code
    last time I looked. If you're using regular expressions

    \w+://[^\])>\s]+

    is a simple regex that should work for most cases.

    [a-zA-Z]+://[-\w$+!*'#%&;@?/=:]+

    is a bit more thorough.

     
  • C L
    C L
    2006-01-26

    Logged In: YES
    user_id=1425757

    I guess it's safe to always exclude < and > from urls, even when unpaired. Don't
    bother fixing the existing code, it will have to be revised anyway to use the new
    url checking in xchat core (for lagnat: I already wrote that, more info + patch
    when I get my hand back). We'll then see if this fix should be done in xchat core
    or XCA.