mirror of
https://github.com/webmin/webmin.git
synced 2026-07-25 19:00:31 +01:00
Update tests to recognize hex numeric HTML entities
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user