Update tests to recognize hex numeric HTML entities
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled

This commit is contained in:
Ilia Ross
2026-06-29 23:28:48 +02:00
parent aa2282778e
commit cc4bb35dee

View File

@@ -38,6 +38,9 @@ subtest 'html_escape' => sub {
is(main::html_escape('&'), '&', 'default mode double-escapes &');
is(main::html_escape('&', 1), '&', 'nodblamp preserves existing &');
is(main::html_escape('A', 1), 'A', 'nodblamp preserves numeric entity');
is(main::html_escape('◦', 1), '◦', 'nodblamp preserves hex numeric entity');
is(main::html_escape('◦', 1), '◦', 'nodblamp preserves uppercase hex numeric entity');
is(main::html_escape('&#xZZ;', 1), '&#xZZ;', 'nodblamp escapes invalid hex numeric entity');
# Note: nodblamp's lookahead matches any &<letters>; as an entity, so
# made-up names like &x; are treated as entities and not re-escaped.
is(main::html_escape('&x;', 1), '&x;', 'nodblamp preserves arbitrary &word; shape');