https://bugzilla.wikimedia.org/show_bug.cgi?id=30269
Roan Kattouw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |need-review, patch --- Comment #8 from Roan Kattouw <[email protected]> 2011-08-12 15:40:12 UTC --- I've added two patches that fix this bug in different ways, neither of which I'm particularly happy with. Option 1 is to create another version of $this->mUrlProtocols that somehow excludes '//'. The way I've done it in my patch is particularly hacky; it could be done a bit more cleanly in wfUrlProtocols() or something, but I didn't feel like making that effort today. I think this option, changed to exclude '//' in a more elegant way, is probably best. Option 2 adds a lookbehind for ^|\W\b to the regex, which insures that free URLs are only picked up if they are either at the very beginning of the page, or are preceded by a non-word character and a word boundary. In practice, this ensures the URL starts with a word character (because it's preceded by \W\b), which happens to exclude all protocols except '//'. Not only is this hackier than option 1 in principle, it also lets protocol-relative URLs at the very start of the page through (oops!). Thoughts? -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
