Last modified: 2013-05-06 15:26:25 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 T26787, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24787 - TOC anchor name collision (collision avoidance salting can still collide with similar headings)
TOC anchor name collision (collision avoidance salting can still collide with...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Low trivial with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-13 19:31 UTC by DakAD
Modified: 2013-05-06 15:26 UTC (History)
1 user (show)

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


Attachments

Description DakAD 2010-08-13 19:31:40 UTC
---TOC----
1. test
2. test
3. test 2
--/TOC----

== test ==

== test ==

== test 2 ==


.....
talking about the anchors:

The TOC will call the first header 'test'.

To avoid a collision, the TOC will call the second header 'test_2'. Clever TOC.

The TOC will call the third header 'test_2', thus colliding with the other test_2. Silly TOC.

iow, clicking  "3. test 2" in the TOC will jump to "2. test".

Dunno, guess it should check for that or something?
Comment 1 DakAD 2010-08-13 19:36:38 UTC
More normally (in case that was confusing):

1. copy/paste:

[wiki]
__TOC__

== test ==

== test ==

== test 2 ==
[/wiki]

into a wiki page.


2. click "3 test 2" in the TOC

expected results: jumps to third header (test 2)
actual results: jumps to second header (test)

due to the anchor-naming system used to avoid collisions.
Comment 2 Technical 13 2013-05-06 15:26:25 UTC
Seems like it would be an e(In reply to comment #2)
> ---TOC----
> 1. test
> 2. test
> 3. test 2
> --/TOC----
> 
> == test ==
> 
> == test ==
> 
> == test 2 ==
> 
> 
> .....
> talking about the anchors:
> 
> The TOC will call the first header 'test'.
> 
> To avoid a collision, the TOC will call the second header 'test_2'. Clever
> TOC.
> 
> The TOC will call the third header 'test_2', thus colliding with the other
> test_2. Silly TOC.
> 
> iow, clicking  "3. test 2" in the TOC will jump to "2. test".
> 
> Dunno, guess it should check for that or something?


I see this often actually... Seems like it would be an easy enough fix though.

To avoid a collision, the TOC should just call the second header 'test_%E2%84%962'. (test_№2)
Then 'test_2' wouldn't be an issue.

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


Navigation
Links