Last modified: 2012-04-16 09:16:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 27474 - [[#_foo|bar]] renders with href="#foo" , breaking Cite anchors with leading underscores
[[#_foo|bar]] renders with href="#foo" , breaking Cite anchors with leading u...
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: 27552 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2011-02-16 20:53 UTC by Roan Kattouw
Modified: 2012-04-16 09:16 UTC (History)
9 users (show)

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


Description Roan Kattouw 2011-02-16 20:53:23 UTC
[[#_foo|bar]] renders as something like <a href="#foo">bar</a>, so apparently something's normalizing the leading underscore away. Because the Cite extension uses parsed messages with something like [[$1|$2]], wikis that have configured their Cite anchors to start with an underscore (like zhwiki) saw Cite break, because the href got normalized but <li id="_foo"> did not.

This is a regression in 1.17.
Comment 1 Mark A. Hershberger 2011-02-21 18:06:16 UTC
*** Bug 27552 has been marked as a duplicate of this bug. ***
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2011-02-21 23:58:08 UTC
This is going to be because of r70526.  I don't know how it could happen -- when I do <span id="_foo"> on my wiki, it translates to <span id="foo">.  (Which might be a bad thing in itself, but wouldn't cause this bug.)  My only guess offhand is that something isn't actually being sent through the parser here.  I'll take a brief look.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2011-02-22 00:44:08 UTC
Nope, this was caused by r68358.  I give the details there.  It only occurs if $wgHtml5 = false, which is probably why no one caught it in testing.  (This is why we need to stop allowing $wgHtml5 = false, maybe for 1.18 -- we couldn't as long as Wikimedia used it.)
Comment 4 Conrad Irwin 2011-02-22 01:04:35 UTC
The only bug is that it's not being normalized away enough. "_" and " " are normally stripped from this place in titles.

If this wants to be changed so that we don't normalize; we'll have to verify that  the links created by the ToC generator, the edit summary generator, {{#anchorencode}} and [[#blah]] all agree on the new behaviour.

See also bug 18431.
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2011-02-22 01:12:35 UTC
See discussion on r68358.
Comment 6 Bawolff (Brian Wolff) 2011-02-24 19:04:10 UTC
btw, relevant system message for cite that seems to cause this is [[mediawiki:Cite_reference_link_prefix]]. Deleting that page will reset it to the default, which would probably work around the issue. (Just mentioning it for any other wikis who have customized it. Someone from eowiki recently came on irc reporting the same issue)
Comment 7 Bawolff (Brian Wolff) 2011-02-24 19:21:58 UTC
Sorry, that should have been [[mediawiki:Cite_references_link_prefix]] ( Cite_references_link_prefix controls the link from the [1] to where the reference text is, Cite_reference_link_prefix controls the link going the other way )
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2011-02-24 22:19:08 UTC
I have to say I've got absolutely no idea why that message even exists.  Can we just remove it from the software?
Comment 9 Arno Lagrange 2011-02-25 07:52:42 UTC
We removed [[:eo:mediawiki:Cite_references_link_prefix]] and now the bug looks like fixed.
Comment 10 Mark A. Hershberger 2011-02-25 16:43:26 UTC
Sounds like this isn't really a tarball blocker, then.  Can we consider it closed or does this need to be documented in the Cite extension, or, as Aryeh suggests, just remove it?
Comment 11 Bawolff (Brian Wolff) 2011-02-25 17:23:58 UTC
I'm in favour of removing those messages, but it would be nice to know not only why they were created, but why so many sites decided to customize them. If they are as useless as they appear, I would not expect them to be customized.
Comment 12 Platonides 2011-04-05 22:40:07 UTC
Bawolff, they were using the pre-r32160 default.

Reverted r68358 in r85481.

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