Page MenuHomePhabricator

Invalid id and name generated for Russian header element
Closed, ResolvedPublic

Description

Some pages with MediaWiki-rendered headers fail to validate using the W3C validator service, because the names and IDs created are invalid. For example:
<a name=".D0.A1.D1.82.D0.B0.D1.82.D1.8C.D0.B8" id=".D0.A1.D1.82.D0.B0.D1.82.D1.8C.D0.B8"></a><h2> <span class="mw-headline"> Статьи </span></h2>

These generated attributes are not even correct in HTML, which specifies that:
'ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").'
http://www.w3.org/TR/html401/types.html#type-id

One possible solution is to add a standard letter prefix to headers when the first character is outside the range [A-Za-z]. Stripping the first "." is not a solution, as hexadecimal number strings may start with a decimal number (e.g. "82" in the above string).


Version: unspecified
Severity: minor
URL: http://ru.wikifur.com/

Details

Reference
bz18838

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:40 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz18838.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 9530 ***