chiark / gitweb /
Properly quote various error messages
[ypp-sc-tools.web-live.git] / yarrg / CommodsWeb.pm
index ab2a4a30a322e002135422a558eb1ecaff0b4c3e..461a8ad49332da3d232121822012e0002ecb00dc 100644 (file)
@@ -52,7 +52,7 @@ BEGIN {
                      &to_json_shim &to_json_protecttags
                      &set_ctype_utf8 &webdatadir
                      &expected_error &dbw_lookup_string
-                     &printable &tr_datarow
+                     &printable &tr_datarow &escerrq
                      &prettyprint_age &meta_prettyprint_age);
     %EXPORT_TAGS = ( );
 
@@ -222,6 +222,11 @@ sub tr_datarow ($$) {
     }
 }
 
+sub escerrq ($) {
+    return '“'.CGI::escapeHTML($_[0]).'”';
+#    return '‘'.CGI::escapeHTML($_[0]).'’';
+}
+
 package CommodsWeb::ExpectedError;
 
 sub emsg ($) {