Bug 1650059 - Report 1024 as byte limit for meta charset sniff. DONTBUILD NPOTB r=alchen

Fixes https://github.com/validator/validator/issues/232

Differential Revision: https://phabricator.services.mozilla.com/D81999
This commit is contained in:
Michael[tm] Smith 2020-07-06 12:44:15 +00:00
Родитель e52b75de58
Коммит 7f7f8f9d1f
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1287,7 +1287,7 @@ public class Tokenizer implements Locator {
// [NOCPP[ // [NOCPP[
if (metaBoundaryPassed && AttributeName.CHARSET == attributeName if (metaBoundaryPassed && AttributeName.CHARSET == attributeName
&& ElementName.META == tagName) { && ElementName.META == tagName) {
err("A \u201Ccharset\u201D attribute on a \u201Cmeta\u201D element found after the first 512 bytes."); err("A \u201Ccharset\u201D attribute on a \u201Cmeta\u201D element found after the first 1024 bytes.");
} }
// ]NOCPP] // ]NOCPP]
if (attributeName != null) { if (attributeName != null) {
@ -1335,7 +1335,7 @@ public class Tokenizer implements Locator {
// [NOCPP[ // [NOCPP[
if (metaBoundaryPassed && ElementName.META == tagName if (metaBoundaryPassed && ElementName.META == tagName
&& AttributeName.CHARSET == attributeName) { && AttributeName.CHARSET == attributeName) {
err("A \u201Ccharset\u201D attribute on a \u201Cmeta\u201D element found after the first 512 bytes."); err("A \u201Ccharset\u201D attribute on a \u201Cmeta\u201D element found after the first 1024 bytes.");
} }
// ]NOCPP] // ]NOCPP]
if (attributeName != null) { if (attributeName != null) {