https://bugzilla.wikimedia.org/show_bug.cgi?id=18431

           Summary: Inconsistent anchor creation breaks links
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: Page rendering
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Currently, anchor ids are created four different ways at the five different
places they are used. As a test case, try "_ +.3A%3A]]"

TOC (Parser.php):                       "__.2B.3A.253A.5D.5D"
Link (Title.php):                       "_.3A:.5D.5D"
redirectToFragment (Article.php):       "_.3A:.5D.5D"
History (Linker.php):                   "_.2B.3A.253A"
Anchorencode (CoreParserFunctions.php): "__.2B:.253A.5D.5D"

See [[User:Amalthea/test10]] for a demonstration

This regularly breaks the link from history/contributions/RC to the section,
makes it hard or impossible to duplicate the functionality in tools (NAVPOP
just now), and can break normal section links.

I presume this could easily be fixed by all using the same static function from
Title::escapeFragmentForURL, without any additional superfluous logic (in
particular stripping "[[", "[[:", "]]" in Linker.php).

The only thing that will still be necessary is ensuring unique ids in the TOC
of course. This can still make those links point to unintended sections, but in
a controlled way.


See also Bug 17857 and Bug 2831.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to