Code

Warning cleanup
[inkscape.git] / po / check-markup
index 61bee8d42b85e997b9250d62917d6b723a007cb7..f11ca1f0bcc815baa0219045a55659fb892d4c99 100755 (executable)
@@ -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;
     }