Implement named character entity replacement

https://html.spec.whatwg.org/multipage/syntax.html#tokenizing-character-references
This commit is contained in:
iska
2014-10-23 20:07:30 +02:00
parent e88f0ae3e3
commit 968a6aff79
6 changed files with 110 additions and 24 deletions
+7
View File
@@ -137,6 +137,13 @@ NS_INLINE BOOL isHexDigit(UTF32Char character)
(character >= LATIN_SMALL_LETTER_A && character <= LATIN_SMALL_LETTER_F));
}
NS_INLINE BOOL isAlphanumeric(UTF32Char character)
{
return ((character >= DIGIT_ZERO && character <= DIGIT_NINE) ||
(character >= LATIN_CAPITAL_LETTER_A && character <= LATIN_CAPITAL_LETTER_Z) ||
(character >= LATIN_SMALL_LETTER_A && character <= LATIN_SMALL_LETTER_Z));
}
NS_INLINE BOOL isValidNumericRange(UTF32Char character)
{
return ((character >= 0xD800 && character <= 0xDFFF) ||