Last modified: 2013-05-02 18:10:38 UTC
In https://bugzilla.wikimedia.org/show_bug.cgi?id=46828#c0 , [[vi:Wikipedia:Thảo luận#Patroller và autopatroller]] is not autolinked. Needs fixing the regex in https://gerrit.wikimedia.org/r/gitweb?p=wikimedia/bugzilla/modifications.git;a=blob;f=bugzilla-4.2/extensions/Wikimedia/Extension.pm#l41 Adding easy keyword as it's easy to fix for people that know regexes.
The current regex \[\[([a-zA-Z0-9_ ,./'()!#\*\$%:\x80-\xff-]+)\]\] does not match [[vi:Wikipedia:Thảo luận#Patroller và autopatroller]] due to ảậ not being included in the allowed regex character ranges. Changing the regex to something less strict, like \[\[([a-zA-Z0-9_ ,./'()!#\*\$%:\u0080-\u024f\u1e00-\u1eff-]+)\]\] would theoretically fix that, though would still not support linebreaks. And this works when testing the regex in Firefox with Javascript. In Bugzilla 4.2 (Perl) it does not work. Perl seems to not interpret \u correctly, because I also tried with \u0080-\u00ff instead of current \x80-\xff which should show the same successful linking but it doesn't, and I think we don't want to allow any random characters here (though I'm not aware of any potential security implications).
https://gerrit.wikimedia.org/r/#/c/54503/
Refering to MatmaRex' patch: As the automatic linking in Bugzilla has a &go=Go parameter, creating something like [[vi:Wikipedia:Thảo luận&action=whatever]] could be at minimum confusing, but no idea if this could be used in any harmful way? Might make sense to also exclude the ampersand?
If anything, the search string should be URL-encoded; titles like [[C&C]] are entirely valid and should be allowed. I'll update my patch to do that, too.
Done in latest patchset (the patch is Ie3dbf0a6, by the way).
https://gerrit.wikimedia.org/r/54503 (Gerrit Change Ie3dbf0a68e94db15b1daacea25f443ca2392be96) | change APPROVED and MERGED [by Dzahn]
Deployed by mutante, yay.
Related URL: https://gerrit.wikimedia.org/r/60701 (Gerrit Change I1eadfecacc5abb7a3c12b0ee5e2ffdfffe1abd81)
This seems to break links to sections, and I1eadfeca is intended to fix that: compare [[Cat]], [[Cat#Anatomy]], [[pl:Kot domowy]], [[pl:Kot domowy#Anatomia]], [[pl:Kot domowy#Wędrówki]].
Alright, false alarm. Only some links break (such as the ones in bug 45979 comment 0), and apparently only on Opera, so I'm not motivated enough to look into that :). Closing.
https://gerrit.wikimedia.org/r/60701 (Gerrit Change I1eadfecacc5abb7a3c12b0ee5e2ffdfffe1abd81) | change ABANDONED [by Matmarex]