Page MenuHomePhabricator

{{anchorencode:}} removes text between < and >
Open, LowPublic

Description

Author: jelle.zijlstra

Description:
This is problematic because [[:en:Template:Cite doi]] uses anchorencode to encode its DOIs, and DOIs with <> in it get butched. I think this is a recent change in the way anchorencode works, but I'm not sure about that.


Version: unspecified
Severity: normal
URL: https://en.wikipedia.org/wiki/User:Ucucha/anchorencodebug

Details

Reference
bz28212

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:31 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz28212.
bzimport added a subscriber: Unknown Object (MLST).

10 years later, this is still an issue. Consider a section like

== version <= 42 and version > 24 ==

You can link to the section like [[#version <= 42 and version > 24]] or [[#version_%3C=_42_and_version_%3E_24]], the latter is actually produced by the __TOC__ (assuming $wgFragmentMode='html5'). But if you put {{anchorencode:}} into play, it fails terribly:

[[#{{anchorencode:version <= 42 and version > 24}}]][[#version_24]]

Related to https://phabricator.wikimedia.org/T20431