Page MenuHomePhabricator

Parser's stripSectionName should get the same text as Linker::normalizeSubpageLink for a [[/Subpage/]] link in the summary
Open, MediumPublic


Compare the default summary of an edit on sections of [[Wikipedia:Sandbox/Subpage]] with the following headers:

(1) == [[Wikipedia:Sandbox/Subpage|Subpage]] ==

(2) == /Subpage/ ==

The autosummaries were the following in each case:
(1) /* Subpage */
(2) /* /Subpage/ */

The second one is wrong and should be equals to the first one, just as happens with the displayed text of the corresponding links.

Version: unspecified
Severity: normal



Event Timeline

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

FYI: The symptoms are the same of Bug 28055. Maybe this can be fixed similarly.

On current version of MW (downloaded from git), the text of the autosummary produced by $wgParser->stripSectionName[1] is still inconsistent with the text of the subpage links created by Linker::normalizeSubpageLink[2], because the capturing group of the regex
matches "/Subpage/" in the text "/Subpage/".[3]

Maybe it should be changed to
per example at [4].