Last modified: 2014-11-05 00:33:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74887, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72887 - <indicator/> tag hook contents are not parsed correctly (symptoms: links replaced with comments, list syntax not parsed, strip markers)
<indicator/> tag hook contents are not parsed correctly (symptoms: links repl...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Highest normal (vote)
: ---
Assigned To: Bartosz Dziewoński
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-02 18:44 UTC by Bartosz Dziewoński
Modified: 2014-11-05 00:33 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bartosz Dziewoński 2014-11-02 18:44:44 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.
Comment 1 Bartosz Dziewoński 2014-11-02 18:45:14 UTC
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.
Comment 2 Bartosz Dziewoński 2014-11-02 18:45:48 UTC
I'm working on a patch and I intend to have it deployed on Monday.
Comment 3 Gerrit Notification Bot 2014-11-02 18:59:52 UTC
Change 170593 had a related patch set uploaded by Bartosz Dziewoński:
Correctly parse <indicator/> contents, Parser rejiggering

https://gerrit.wikimedia.org/r/170593
Comment 4 Bartosz Dziewoński 2014-11-02 19:10:05 UTC
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>
Comment 5 Bartosz Dziewoński 2014-11-02 21:16:04 UTC
Adding parser tests including the above in https://gerrit.wikimedia.org/r/170599
Comment 6 Andre Klapper 2014-11-03 06:00:02 UTC
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.
Comment 7 Gerrit Notification Bot 2014-11-04 19:37:49 UTC
Change 171010 had a related patch set uploaded by Jforrester:
Correctly parse <indicator/> contents, Parser rejiggering

https://gerrit.wikimedia.org/r/171010
Comment 8 Gerrit Notification Bot 2014-11-04 19:38:11 UTC
Change 171011 had a related patch set uploaded by Jforrester:
Correctly parse <indicator/> contents, Parser rejiggering

https://gerrit.wikimedia.org/r/171011
Comment 9 Gerrit Notification Bot 2014-11-04 19:41:29 UTC
Change 170593 merged by jenkins-bot:
Correctly parse <indicator/> contents, Parser rejiggering

https://gerrit.wikimedia.org/r/170593
Comment 10 Gerrit Notification Bot 2014-11-05 00:21:18 UTC
Change 171010 merged by Chad:
Correctly parse <indicator/> contents, Parser rejiggering

https://gerrit.wikimedia.org/r/171010
Comment 11 Gerrit Notification Bot 2014-11-05 00:21:28 UTC
Change 171011 merged by Chad:
Correctly parse <indicator/> contents, Parser rejiggering

https://gerrit.wikimedia.org/r/171011

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links