chiark / gitweb /
prefer to use ids to names; names aren't even valid in divs
[ypp-sc-tools.db-live.git] / yarrg / web / routetextstring
index c39d48bde187a9d86600454c4a1456c44a4d61f1..4202ce9a4881b69c2343ca00400f52105d926d2b 100644 (file)
@@ -29,7 +29,8 @@ if ($format =~ 'json') {
        $r->content_type($ctype or $format);
        $output= sub { print to_json({
                success => 1,
-               show => encode_entities($canontext),
+               show => length $canontext ? encode_entities($canontext)
+                       : ' ',
        })};
        $output_wrong= sub { print to_json({
                success => 0,