Last modified: 2012-04-16 09:15:39 UTC
ca and kaa had an apostrophe (') in their linktrail. In 1.16 this worked fine, in 1.17 this caused things like '''[[Foo]]''' to be interpreted as '''[[Foo|Foo''']], which renders the apostrophes as literal characters in the link text and bolds the rest of the line. In other words, link trail processing seems to be done before triple apostrophe processing rather than after.
The parse order has changed for good reason. The simple way to fix this is to make the link trail regex not match two apostrophes in a row, with something like: / [a-z]* ( ' [a-z]* )? / The complex way to fix it is to implement the same logic in Linker::splitTrail(), so that it works regardless of what the link trail regex is set to.
Created attachment 8332 [details] Proposed fix: Check for double apostrophe in Linker::splitTrail() Unless I'm missing something, the fix is fairly simple. Search for '' in the link trail and put it outside of the link, if found. Only adds one strpos call per link, so it shouldn't add much processing time, either. Parser tests still missing, though. I wasn't sure if we can make them dependent on a certain linktail regex.
Created attachment 8337 [details] Alternative fix: Modify Ca and Kaa linktrail Patch for changing the linktrail in the messages file. The linktrail is not NS_MEDIAWIKI customizable, so we have full control to make them match the current code. I am using a negative lookahead instead of duplicating the rest of the linktrail.
I've committed the fix for the ca & kaa linktrails as r85573, including parser test cases and a fix to Linker::splitTrail() for a bug that caused it to fail to actually test linktrails properly when $wgContLang changes over the course of a run.
For the moment I think I prefer the alt linktrails to the explicit check in splitTrail. Longer term we should consider a genericization of linktrails so we don't need the language-specific checks though, and should then consider apostrophes more generally if they're needed.