Page MenuHomePhabricator

Invalid section-IDs - especially when using special characters
Closed, ResolvedPublic

Description

Author: accnospamtom

Description:
When creating sections like:

Überschrift (german for "heading")

mediawiki produces the following code in HTML:

<pre>
<h2> <span class="mw-headline" id=".C3.9Cberschrift">Überschrift</span></h2>
</pre>

  • id=".C3.9Cberschrift" is clearly wrong (id and name attributes must begin with a letter)
  • it's hard to target such IDs with css
  • Why create a span with an ID in the first place? An element with an id should only exist once in a html document; it cannot be guaranteed that users don't create equal sections (that will lead to multiple IDs with the same name)

Version: 1.16.x
Severity: normal

Details

Reference
bz22693

Event Timeline

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

accnospamtom wrote:

Stupid me, the IDs are numbered consecutively, forget that part, sorry.

  • This bug has been marked as a duplicate of bug 9530 ***