Last modified: 2013-06-08 14:21:49 UTC
"In HTML4 mode, wikitext characters get escaped in the anchor name, e.g. <ref name="foo [[bar]]" /> generates wikitext like <sup id="cite_ref-foo_.5B.5Bbar.5D.5D_0-0" class="reference">[[#cite_note-foo_.5B.5Bbar.5D.5D-0|[1]]]</sup>; note the brackets have changed to ".5B" and ".5D". In HTML5 mode, these characters aren't escaped, generating <sup id="cite_ref-foo_[[bar]]_0-0" class="reference">[[#cite_note-foo_[[bar]]-0|[1]]]</sup> instead, with brackets inside the attempted wikilink. Since brackets cannot actually appear inside a wikilink, boom. Anomie⚔"
This is actually due to $wgExperimentalHtmlIds, not $wgHtml5. It's just that the former does nothing unless the latter is true. This should be fixable in Cite by not encoding the ref name in the anchor name, just generate an arbitrary one.
(In reply to comment #0) > "In HTML4 mode, wikitext characters get escaped in the anchor name, e.g. <ref > name="foo [[bar]]" /> generates wikitext like <sup > id="cite_ref-foo_.5B.5Bbar.5D.5D_0-0" > class="reference">[[#cite_note-foo_.5B.5Bbar.5D.5D-0|[1]]]</sup>; note the > brackets have changed to ".5B" and ".5D". In HTML5 mode, these characters > aren't escaped, generating <sup id="cite_ref-foo_[[bar]]_0-0" > class="reference">[[#cite_note-foo_[[bar]]-0|[1]]]</sup> instead, with brackets > inside the attempted wikilink. Since brackets cannot actually appear inside a > wikilink, boom. Anomie⚔" Is this still an issue? According to <https://noc.wikimedia.org/conf/InitialiseSettings.php.txt>: --- 'wgHtml5' => array( 'default' => false, 'mediawikiwiki' => true, 'testwiki' => true, 'test2wiki' => true, ), --- Using the following wikitext on test.wikipedia.org (testwiki) at <https://test.wikipedia.org/wiki/Cite_using_HTML5>: --- Hello there.<ref name="foo [[bar]]">author</ref><ref name="foo [[bar]]" /> == References == <references /> --- Generated HTML looks like this: --- <p>Hello there.<sup id="cite_ref-foo_.5B.5Bbar.5D.5D_0-0" class="reference"><a href="#cite_note-foo_.5B.5Bbar.5D.5D-0">1</a><span class="reference_comma">,</span></sup><sup id="cite_ref-foo_.5B.5Bbar.5D.5D_0-1" class="reference"><a href="#cite_note-foo_.5B.5Bbar.5D.5D-0">1</a><span class="reference_comma">,</span></sup></p> <h2> <span class="mw-headline" id="References">References</span></h2> <ol class="references"> <li id="cite_note-foo_.5B.5Bbar.5D.5D-0"><span class="mw-cite-backlink">^ <span class="citerefmanylink"><a href="#cite_ref-foo_.5B.5Bbar.5D.5D_0-0"><sup><i><b>a</b></i></sup></a></span> <span class="citerefmanylink"><a href="#cite_ref-foo_.5B.5Bbar.5D.5D_0-1"><sup><i><b>b</b></i></sup></a></span></span> <span class="reference-text">author</span></li> </ol> --- This bug appears to be fixed. Can someone confirm?
(In reply to comment #2) > Using the following wikitext on test.wikipedia.org (testwiki) at Does test.wikipedia.org have $wgExperimentalHtmlIds on or off?
Well, it defaults to false, because it's experimental: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/DefaultSettings.php;h=35ae6bda3c99ac00fab215d39b71d8bb7a1ff5f1;hb=HEAD#l2500 If no one is actively developing it and fixing its bugs, it should probably remain false, or just be removed. I hope no one tried turning it on anywhere.
(In reply to comment #4) > I hope no one tried turning it on anywhere. I guess someone did in February 2011.
Yes, I enabled it, and then re-disabled it when there were problems: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=commitdiff;h=40a41100300c02abf95328e303ec4400de7a5fd9 https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=commitdiff;h=e2ba564eb7e52b5863a7ae6de751070406709d5a