Last modified: 2012-12-22 21:14:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32084, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30084 - Parser's stripSectionName should get the same text as Linker::normalizeSubpageLink for a [[/Subpage/]] link in the summary
Parser's stripSectionName should get the same text as Linker::normalizeSubpag...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-27 16:12 UTC by Helder
Modified: 2012-12-22 21:14 UTC (History)
1 user (show)

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


Attachments

Description Helder 2011-07-27 16:12:32 UTC
Compare the default summary of an edit on sections of [[Wikipedia:Sandbox/Subpage]] with the following headers:

(1) == [[Wikipedia:Sandbox/Subpage|Subpage]] ==
https://secure.wikimedia.org/wikipedia/en/w/index.php?diff=441724658&oldid=441724577

(2) == [[/Subpage/]] ==
https://secure.wikimedia.org/wikipedia/en/w/index.php?diff=441724701&oldid=441724658

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.
Comment 1 Helder 2011-07-27 16:15:01 UTC
FYI: The symptoms are the same of Bug 28055. Maybe this can be fixed similarly.
Comment 2 Helder 2012-12-22 21:14:35 UTC
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].

[1] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/parser/Parser.php;h=0f22755e0921fa9ba38d9636999ef7b831dee816;hb=HEAD#l5675

[2] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/Linker.php;h=05a9905669f95fcb573f851da6d58bad8a340161;hb=HEAD#l1471

[3] http://www.rubular.com/r/lVQGMcZKGA
[4] http://www.rubular.com/r/2ckz5UIDBb

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


Navigation
Links