Last modified: 2014-11-05 00:33:03 UTC
On Sat, 01 Nov 2014 20:55:44 +0100, Bryan Davis wrote: > Quiddity pointed me to the help page for status indicators because of > something he saw me playing with for linking to Phabricator projects. > I tried it out and the badge I had made doesn't render as I'd expect > on mw.o. The parser is swallowing links in the indicator content and > replacing them with html comments. Check out my test page and see what > I mean: > <https://www.mediawiki.org/wiki/User:BDavis_(WMF)/Notes/Indicator_test> > > Since your commit message explicitly mentioned "Redirect shortcuts > display" as one use for this feature this seems like a bug, but I > thought I'd ask you if this was expected or not before filing one.
This is because I used Parser::recursiveTagParse(), and contrary to its documentation the output of this function is not fully parsed html; it is "half-parsed" instead, which means that lists and links have not been fully parsed yet, and strip markers are still present. It is apparently meant to be used only if the result will be output directly back onto the page, which will cause it to go through the rest of parsing business. That is not happening in this case, as we pull the content out to display it elsewhere.
I'm working on a patch and I intend to have it deployed on Monday.
Change 170593 had a related patch set uploaded by Bartosz Dziewoński: Correctly parse <indicator/> contents, Parser rejiggering https://gerrit.wikimedia.org/r/170593
Torture test – all of the below fail now and work with the patch: <indicator name=link>[[Main Page]]</indicator> <indicator name=list>* foo * bar</indicator> <indicator name=nowiki><nowiki>foo</nowiki></indicator>
Adding parser tests including the above in https://gerrit.wikimedia.org/r/170599
Is that something to backport to 1.25wmf6 before group1 is deployed on Tuesday? Was the problem triggered by a recent change? I admit I'm pretty clueless how commonly <indicator> is used (yet) and judging the urgency of this bug.
Change 171010 had a related patch set uploaded by Jforrester: Correctly parse <indicator/> contents, Parser rejiggering https://gerrit.wikimedia.org/r/171010
Change 171011 had a related patch set uploaded by Jforrester: Correctly parse <indicator/> contents, Parser rejiggering https://gerrit.wikimedia.org/r/171011
Change 170593 merged by jenkins-bot: Correctly parse <indicator/> contents, Parser rejiggering https://gerrit.wikimedia.org/r/170593
Change 171010 merged by Chad: Correctly parse <indicator/> contents, Parser rejiggering https://gerrit.wikimedia.org/r/171010
Change 171011 merged by Chad: Correctly parse <indicator/> contents, Parser rejiggering https://gerrit.wikimedia.org/r/171011