html: Fix check for partial named character references

Digits are allowed after the first character.
This commit is contained in:
Nick Wellnhofer 2025-02-19 12:53:32 +01:00
parent f68c70d298
commit b8234e8c73

View File

@ -3229,7 +3229,9 @@ htmlParseCharData(htmlParserCtxtPtr ctxt, int partial) {
* &CounterClockwiseContourIntegral; has 33 bytes. * &CounterClockwiseContourIntegral; has 33 bytes.
*/ */
for (i = 1; i < avail; i++) { for (i = 1; i < avail; i++) {
if ((i >= 32) || !IS_ASCII_LETTER(in[i])) { if ((i >= 32) ||
(!IS_ASCII_LETTER(in[i]) &&
((i < 2) || !IS_ASCII_DIGIT(in[i])))) {
terminated = 1; terminated = 1;
break; break;
} }