[Webkit-unassigned] [Bug 48225] Language attribute validation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 26 10:07:57 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=48225


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #71901|review?                     |review-
               Flag|                            |




--- Comment #16 from Alexey Proskuryakov <ap at webkit.org>  2010-10-26 10:07:57 PST ---
(From update of attachment 71901)
View in context: https://bugs.webkit.org/attachment.cgi?id=71901&action=review

> LayoutTests/ChangeLog:9
> +        The contents of the language attribute are expected to follow the BCP 47
> +        specification. However no validation at all is performed on it. This patch

What are the specs governing this? In HTML5, I could find that in two places:
- authoring requirements, which are irrelevant to browsers;
- non-normative list of attributes, saying that value of hreflang, lang, and srclang attributes is a "valid BCP 47 language tag".

So, I don't see that requirement specified anywhere. And Firefox 3.6 fails the test case included in this patch. Does IE pass it?

> LayoutTests/fast/dom/Element/language-valid.html:9
> +        p:lang(en) { text-transform: uppercase; }
> +        p:lang(iην41iδ_セ4g) { text-transform: uppercase; }

We'd need tests for more forbidden characters - ideally, for every forbidden ASCII character, like en/GB.

Please use red/green color in results for easier visual evaluation <http://www.w3.org/Style/CSS/Test/guidelines.html#color>.

> WebCore/dom/Element.cpp:1513
> +            if (!isASCIIAlphanumeric(c) && c != '-')
> +                return AtomicString();

Is an invalid value equivalent to lang="", or should it be ignored?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list