X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=po%2Fcheck-markup;h=f11ca1f0bcc815baa0219045a55659fb892d4c99;hb=5141c2f75c6d9673f87dc96e3678fe5a3099bb78;hp=61bee8d42b85e997b9250d62917d6b723a007cb7;hpb=75a68d6ceb269d78054ba138a5d8fd6b5a37c9b8;p=inkscape.git diff --git a/po/check-markup b/po/check-markup index 61bee8d42..f11ca1f0b 100755 --- a/po/check-markup +++ b/po/check-markup @@ -66,8 +66,18 @@ sub check_str ($) { } } - 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; }