diff --git a/po/check-markup b/po/check-markup
index 61bee8d42b85e997b9250d62917d6b723a007cb7..f11ca1f0bcc815baa0219045a55659fb892d4c99 100755 (executable)
--- a/po/check-markup
+++ b/po/check-markup
}
}
- if ($str =~ m{&#[^0-9]+;}) {
- po_error("Entity declaration error (must look like '{')");
+ if (($str =~ m{&#[^0-9]+;}) or ($str =~ m{&#x[^0-9a-fA-F]+;})) {
+ po_error("Entity declaration error (must look like '{' or '@' and be in ASCII)");
+ return 0;
+ }
+
+ if (($str =~ m{&#[^0-9]+}) or ($str =~ m{&#x[^0-9a-fA-F]+})) {
+ po_error("Entity declaration error 2 (must look like '{' or '@' and be in ASCII)");
+ return 0;
+ }
+
+ if (($str =~ m{&#(?![0-9]{2,4};)}) or ($str =~ m{&#x(?![0-9a-fA-F]{2,4};)})) {
+ po_error("Entity declaration error 3 (must look like '{' or '@' and be in ASCII)");
return 0;
}