Skip to content

Commit

Permalink
Report 1024 as byte limit for meta charset sniff
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Jul 4, 2020
1 parent 8bd0b78 commit 8fac68b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nu/validator/htmlparser/impl/Tokenizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ private void addAttributeWithoutValue() throws SAXException {
// [NOCPP[
if (metaBoundaryPassed && AttributeName.CHARSET == attributeName
&& 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]
if (attributeName != null) {
Expand Down Expand Up @@ -1337,7 +1337,7 @@ private void addAttributeWithValue() throws SAXException {
// [NOCPP[
if (metaBoundaryPassed && ElementName.META == tagName
&& 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]
if (attributeName != null) {
Expand Down

0 comments on commit 8fac68b

Please sign in to comment.