Page MenuHomePhabricator

$wgFragmentMode='html5' breaks links to titles with tabs
Closed, ResolvedPublic

Description

Consider a section with a tab, e.g. == A B ==. With the legacy mode, linking to this section was possible, because the fragment ID was A.09B. In the HTML5 mode, however, linking to the section is not possible using the following ways:

  • [[#.09B]] does not work because HTML5 mode does not produce encoded fragments
  • [[#A B]] does not work because the parser does not accept tabs inside double square brackets
  • [[#{{anchorencode:A B}}]] does not work because the whitespace (which is produced by the anchorencode parser function) is somehow stripped and the link is equivalent to [[#AB]]

Event Timeline

This changed in some version, probably due to https://phabricator.wikimedia.org/T238385, and the anchor of == A B == is actually A_B now, which is also the result of {{anchorencode:A B}} as of 1.35.2.