|
@ -88,9 +88,8 @@ function replaceEntityPattern(match, name) { |
|
|
|
|
|
|
|
|
if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) { |
|
|
if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) { |
|
|
code = name[1].toLowerCase() === 'x' ? |
|
|
code = name[1].toLowerCase() === 'x' ? |
|
|
parseInt(name.slice(2), 16) |
|
|
parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10); |
|
|
: |
|
|
|
|
|
parseInt(name.slice(1), 10); |
|
|
|
|
|
if (isValidEntityCode(code)) { |
|
|
if (isValidEntityCode(code)) { |
|
|
return fromCodePoint(code); |
|
|
return fromCodePoint(code); |
|
|
} |
|
|
} |
|
|