This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24205 - The agorithm for parsing http-equiv="content-language" ignores everything after the first non-leading whitespace. This looks wrong, and is not what browsers do. Test case: data:text/html,<meta http-eq [...]
Summary: The agorithm for parsing http-equiv="content-language" ignores everything aft...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-04 16:37 UTC by contributor
Modified: 2014-01-09 19:19 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2014-01-04 16:37:22 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html
Multipage: http://www.whatwg.org/C#table-http-equiv
Complete: http://www.whatwg.org/c#table-http-equiv
Referrer: 

Comment:
The agorithm for parsing http-equiv="content-language" ignores everything
after the first non-leading whitespace. This looks wrong, and is not what
browsers do. Test case: data:text/html,<meta http-equiv="content-language"
content="fr something"><style>p:lang(fr){background:red

Posted from: 109.145.134.13
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Comment 1 Simon Sapin 2014-01-04 16:38:42 UTC
The test case above is wrong, sorry. Correct test case:

data:text/html,<meta http-equiv="content-language" content="fr something"><style>body:lang(fr){background:red
Comment 2 Ian 'Hixie' Hickson 2014-01-04 21:53:34 UTC
Yeah, but browsers should just change to match the spec there. Spaces are never valid in language codes, so why would we ever intentionally parse a language code to have a space in it?
Comment 3 Simon Sapin 2014-01-04 22:24:36 UTC
Exactly. Unless I’m reading this wrong, this algorithm will accept a value with a space and only look at the part before that.
Comment 4 Ian 'Hixie' Hickson 2014-01-09 19:19:20 UTC
per discussion on IRC
Comment 5 contributor 2014-01-09 19:19:30 UTC
Checked in as WHATWG revision r8389.
Check-in comment: Mention that the content-language pragma intentionally ignores words after the first (hopefully browsers end up matching this... they vary in their behaviour today)
http://html5.org/tools/web-apps-tracker?from=8388&to=8389