mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Fix broken escape behaviour in regexp ranges
This commit is contained in:
11
xmlregexp.c
11
xmlregexp.c
@ -4892,6 +4892,17 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ctxt->atom->type == XML_REGEXP_RANGES) {
|
} else if (ctxt->atom->type == XML_REGEXP_RANGES) {
|
||||||
|
switch (cur) {
|
||||||
|
case 'n':
|
||||||
|
cur = '\n';
|
||||||
|
break;
|
||||||
|
case 'r':
|
||||||
|
cur = '\r';
|
||||||
|
break;
|
||||||
|
case 't':
|
||||||
|
cur = '\t';
|
||||||
|
break;
|
||||||
|
}
|
||||||
xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
|
xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
|
||||||
XML_REGEXP_CHARVAL, cur, cur, NULL);
|
XML_REGEXP_CHARVAL, cur, cur, NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user