https://bugzilla.wikimedia.org/show_bug.cgi?id=30269
MZMcBride <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #9 from MZMcBride <[email protected]> 2011-08-12 22:18:06 UTC --- (In reply to comment #8) > 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. Yeah, it kinda sucks that wfUrlProtocols returns a string rather than an array. Otherwise you could use unset or array_diff here pretty cleanly. > 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!). To me, this option is a complete non-starter. It'll present all sorts of edge cases and weirdness. Imagine a template that contains only a protocol-relative URL being transcluded elsewhere. Will it be linked? Unlinked? Who knows. -- 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
