Opened 9 years ago

Closed 7 years ago

#1085 closed defect (inactive)

URL auto-linking (Gecko): IP numbers don't work

Reported by: ray Owned by: gogo
Priority: normal Milestone: Version 1.0
Component: Xinha Core Version:
Severity: minor Keywords:
Cc:

Description

  1. 192.168.0.1 doesn't get linked
  2. 123.123.123.1 is linked as http://123.123.123
  3. other strange stuff happens, like
    192.168.158.158 
    <a href="http://192.168.158.158">123.15.158.23&nbsp;</a> <a href="http://ray.ray.de">ray.ray.de</a> <a href="http://192.168.158.158">http://ray.test.de</a> <br />
    

I have no idea how I did this, but it's real

(funny, as I preview this the wrong IP number above is linked, too)

Change History (5)

comment:1 Changed 9 years ago by ray

rev [894]: "temporarily" disabled auto-linking with IP numbers.

Btw. IE's native functionality doesn't link IPs either

comment:2 Changed 9 years ago by guest

The RegExp? Xinha.RE_url doen't support IP parts with only one digit!
I (gocher) use the a large RegExp? and with this one the old funtion before rev 894 works fine.

Xinha.RE_url = /(?:(http:\/\/|https:\/\/|ftp:\/\/|news:\/\/|nntp:\/\/|telnet:\/\/|irc:\/\/|mms:\/\/|ed2k:\/\/|xmpp:|mailto:)?[^\^\[\]{}|\\"\'<>`\s]*[^!@\^()\[\]{}|\\:;"\',.?<>`\s])|(?:(?:(?:(?:[^@:<>(){}`\'"\/\[\]\s]+:)?[^@:<>(){}`\'"\/\[\]\s]+@)?(www|ftp|irc|jabber)\.(?:[^`~!@#$%^&*()_=+\[{\]}\\|;:\'",<.>\/?\s]+\.)+[a-z]{2,6}(?:[\/#?](?:[^\^\[\]{}|\\"\'<>`\s]*[^!@\^()\[\]{}|\\:;"\',.?<>`\s])?)?)|(?:(?:[^@:<>(){}`\'"\/\[\]\s]+@)?((?:(?:(?:(?:[0-1]?[0-9]?[0-9])|(?:2[0-4][0-9])|(?:25[0-5]))(?:\.(?:(?:[0-1]?[0-9]?[0-9])|(?:2[0-4][0-9])|(?:25[0-5]))){3})|(?:[A-Fa-f0-9:]{16,39}))|(?:(?:[^`~!@#$%^&*()_=+\[{\]}\\|;:\'",<.>\/?\s]+\.)+[a-z]{2,6}))\/(?:[^\^\[\]{}|\\"\'<>`\s]*[^!@\^()\[\]{}|\\:;"\',.?<>`\s](?:[#?](?:[^\^\[\]{}|\\"\'<>`\s]*[^!@\^()\[\]{}|\\:;"\',.?<>`\s])?)?)?)|(?:[^@:<>(){}`\'"\/\[\]\s]+:[^@:<>(){}`\'"\/\[\]\s]+@((?:(?:(?:(?:[0-1]?[0-9]?[0-9])|(?:2[0-4][0-9])|(?:25[0-5]))(?:\.(?:(?:[0-1]?[0-9]?[0-9])|(?:2[0-4][0-9])|(?:25[0-5]))){3})|(?:[A-Fa-f0-9:]{16,39}))|(?:(?:[^`~!@#$%^&*()_=+\[{\]}\\|;:\'",<.>\/?\s]+\.)+[a-z]{2,6}))(?:\/(?:(?:[^\^\[\]{}|\\"\'<>`\s]*[^!@\^()\[\]{}|\\:;"\',.?<>`\s])?)?)?(?:[#?](?:[^\^\[\]{}|\\"\'<>`\s]*[^!@\^()\[\]{}|\\:;"\',.?<>`\s])?)?))|([^@:<>(){}`\'"\/\[\]\s]+@(?:(?:(?:[^`~!@#$%^&*()_=+\[{\]}\\|;:\'",<.>\/?\s]+\.)+[a-z]{2,6})|(?:(?:(?:(?:(?:[0-1]?[0-9]?[0-9])|(?:2[0-4][0-9])|(?:25[0-5]))(?:\.(?:(?:[0-1]?[0-9]?[0-9])|(?:2[0-4][0-9])|(?:25[0-5]))){3})|(?:[A-Fa-f0-9:]{16,39}))))(?:[^\^*\[\]{}|\\"<>\/`\s]+[^!@\^()\[\]{}|\\:;"\',.?<>`\s])?)/i;

comment:3 Changed 9 years ago by ray

There's something with this RegExp?, it seems to match any string

comment:4 Changed 9 years ago by ray

  • Milestone set to Version 1.0
  • Severity changed from major to minor

comment:5 Changed 7 years ago by gogo

  • Resolution set to inactive
  • Status changed from new to closed

Old.

Note: See TracTickets for help on using tickets.