You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/org/htmlunit/cyberneko/HTMLUnicodeEntitiesParser.java
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -56,25 +56,30 @@ public HTMLUnicodeEntitiesParser() {
56
56
}
57
57
58
58
publicvoidsetMatchFromCode() {
59
-
// If the number is 0x00, then this is a null-character-reference parse error. Set the character reference code to 0xFFFD.
60
-
// If the number is greater than 0x10FFFF, then this is a character-reference-outside-unicode-range parse error. Set the character reference code to 0xFFFD.
59
+
// If the number is 0x00, then this is a null-character-reference parse error.
60
+
// Set the character reference code to 0xFFFD.
61
+
// If the number is greater than 0x10FFFF, then this is
62
+
// a character-reference-outside-unicode-range parse error. Set the character reference code to 0xFFFD.
61
63
if ((0x00 == code_) || (code_ > 0x10FFFF)) {
62
64
match_ = "\uFFFD";
63
65
matchLength_ = consumedCount_;
64
66
return;
65
67
}
66
68
67
-
// If the number is a surrogate, then this is a surrogate-character-reference parse error. Set the character reference code to 0xFFFD
69
+
// If the number is a surrogate, then this is
70
+
// a surrogate-character-reference parse error. Set the character reference code to 0xFFFD
68
71
if (Character.isSurrogate((char) code_)) {
69
72
match_ = "\uFFFD";
70
73
return;
71
74
}
72
75
73
76
// If the number is a noncharacter, then this is a noncharacter-character-reference parse error.
74
77
75
-
// If the number is 0x0D, or a control that's not ASCII whitespace, then this is a control-character-reference parse error.
78
+
// If the number is 0x0D, or a control that's not ASCII whitespace,
79
+
// then this is a control-character-reference parse error.
76
80
77
-
// If the number is one of the numbers in the first column of the following table, then find the row with that number in the first column,
81
+
// If the number is one of the numbers in the first column of the following table,
82
+
// then find the row with that number in the first column,
78
83
// and set the character reference code to the number in the second column of that row.
0 commit comments