Change parsing of language tags for the Accept-Language header to accept from 2 to 8 characters in the first subtag. Bug 208277, author=d95mback@dtek.chalmers.se, r=smontagu, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@144407 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
fa597af96b
commit
301bfe1dc9
@ -302,7 +302,7 @@ function IsRFC1766LangTag(candidate) {
|
||||
or an IANA registered tag from 3 to 8 characters.
|
||||
*/
|
||||
if (tags.length > 1) {
|
||||
if (tags[1].length < 2 || tags[1].length > 3) return false;
|
||||
if (tags[1].length < 2 || tags[1].length > 8) return false;
|
||||
if (!isAlphaNum(tags[1])) return false;
|
||||
|
||||
/* do not allow user-assigned ISO 3166 country codes */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user