Skip to content

Commit d18cec8

Browse files
sideshowbarkerhsivonen
authored andcommitted
Report 1024 as byte limit for meta charset sniff
Fixes validator/validator#232
1 parent 4f9f583 commit d18cec8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nu/validator/htmlparser/impl/Tokenizer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ private void addAttributeWithoutValue() throws SAXException {
12871287
// [NOCPP[
12881288
if (metaBoundaryPassed && AttributeName.CHARSET == attributeName
12891289
&& ElementName.META == tagName) {
1290-
err("A \u201Ccharset\u201D attribute on a \u201Cmeta\u201D element found after the first 512 bytes.");
1290+
err("A \u201Ccharset\u201D attribute on a \u201Cmeta\u201D element found after the first 1024 bytes.");
12911291
}
12921292
// ]NOCPP]
12931293
if (attributeName != null) {
@@ -1335,7 +1335,7 @@ private void addAttributeWithValue() throws SAXException {
13351335
// [NOCPP[
13361336
if (metaBoundaryPassed && ElementName.META == tagName
13371337
&& AttributeName.CHARSET == attributeName) {
1338-
err("A \u201Ccharset\u201D attribute on a \u201Cmeta\u201D element found after the first 512 bytes.");
1338+
err("A \u201Ccharset\u201D attribute on a \u201Cmeta\u201D element found after the first 1024 bytes.");
13391339
}
13401340
// ]NOCPP]
13411341
if (attributeName != null) {

0 commit comments

Comments
 (0)