Open Sorunome opened 10 years ago
Seems to be a bad parse. If you could find me some better regex to use that would parse that correctly I would be much obliged :)
Current regex: https://github.com/Eeems/EeeZorBot/blob/master/scripts/log.js#L286
The regex used in OmnomIRC is text.replace(RegExp("(^|.)(((f|ht)(tp|tps):\/\/)[^\s\x02\x03\x0f\x16\x1d\x1f]*)","g"),'$1$2') Which still isn't perfect, it doesn't stop on quotes....
How thoroughly did you test it?
tested it some, i mean, you know how OmnomIRC parses links, don't you? A downside is that it recognizes ftps as a valid protocol.... (blame netham :P ) Also, just saw that it comes with two regexes for that (to recognize www links) text = text.replace(RegExp("(^|.)(((f|ht)(tp|tps):\/\/)[^\s\x02\x03\x0f\x16\x1d\x1f]_)","g"),'$1$2'); text = text.replace(RegExp("(^|\s)(www.[^\s\x02\x03\x0f\x16\x1d\x1f]_)","g"),'$1$2');
Also, after quick googling, this might help: http://stackoverflow.com/questions/833469/regular-expression-for-url
FTPS is a valid protocol ;) http://en.wikipedia.org/wiki/FTPS
These don't recognize non-url encoded links though do they? Mine does, which is also part of the problem.
Fixed, moved URL parsing to client side.
broke something else by fixing. Reverting somewhat.
Mind checking the url parsing in the re-org branch? It should handle things a lot better.
For where to look on the re-org branch for the url parsing, look here: scripts/logviewer.js#L315
@Sorunome Have you checked this at all? Latest link handling in re-org: mods/log/scripts/http.js#L128
URL parsing is messed up, it doesn't stop at the end of the URL, e.g. http://chat.eeems.ca:9003/?server=irc.omnimaga.org%206667&channel=omnimaga&date=Mon%20Jan%2006%202014#1389065275159