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

--- Comment #36 from Aryeh Gregor <simetrical+wikib...@gmail.com> 2010-12-07 
18:40:15 UTC ---
(In reply to comment #31)
> You can argue anything you want but anything generated like:
>  id=".C2.BF"

MediaWiki trunk does not create such id's.

> is completely invalid.

Not in HTML5.

> Why can't we have ids like:
>   id="Résumé" (which is perfectly valid)
> and we still have to see things like:
>   id="R.C2.E9sum.C2.E9" (which is completely invalid)
> ???

In trunk, the wikitext

  == Résumé ==

produces

  <div id="R.C3.A9sum.C3.A9"></div>
  <h2><span class="mw-headline" id="Résumé">Résumé</span></h2>

The link from the table of contents is <a href="#Résumé">.  (The extra div is
kept so old links don't break -- it can be removed eventually.)

(In reply to comment #32)
> See this reference for the syntax of names (and the restricted set) in XML:
> 
> http://www.w3.org/TR/REC-xml/#NT-Name

HTML5 does not define the id attribute to be an XML Name.  In fact, it has no
DTD at all.  The restrictions on the id element in HTML5 (in both text/html and
XML syntax) are stated here:

"The value must be unique amongst all the IDs in the element's home subtree and
must contain at least one character. The value must not contain any space
characters."
http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute

As further evidence that id's in HTML5 are allowed to start with dots in XML as
well as text/html format, see this link:

http://validator.nu/?doc=data%3Aapplication%2Fxhtml%2Bxml%2C%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22+id%3D%22.%22%3E%3Chead%3E%3Ctitle%3E%3C%2Ftitle%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E

This is not permitted by XHTML 1.0, which we still technically support, but
that's obsolete and I don't expect us to care if we break XHTML 1.0 validation
in some cases in the future.  Eventually we're likely to remove the mode
entirely.  This bug will be INVALID as soon as $wgHtml5 is removed and set
always to true.

(In reply to comment #34)
> Do you still argue that these hex-encoded ID's are "readable" ??? They're
> definitely not !

The id's *in trunk* are readable.  Example heading taken from he.wikipedia.org:

  == איפה נמצא העמוד ראשי של מחר? ==

id generated in trunk:

  id="איפה_נמצא_העמוד_ראשי_של_מחר?"

This is valid in HTML5 and works in the (recent-enough) browsers it's been
tested in.

-- 
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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to