Bug 11741: Correct display of < > in XSLT result lists
[koha_fer] / svc / report
index 3ae39a2..45b68e1 100755 (executable)
@@ -66,16 +66,19 @@ unless ($json_text) {
         else {
             $lines = $sth->fetchall_arrayref;
         }
-        $json_text = to_json($lines);
+        $json_text = encode_json($lines);
 
         if ($cache_active) {
             $cache->set_in_cache( $cache_key, $json_text, $report_rec->{cache_expiry} );
         }
     }
     else {
-        $json_text = to_json($errors);
+        $json_text = encode_json($errors);
     }
 }
 
-print $query->header;
+print $query->header(
+    -charset    => 'UTF-8',
+    -type       => 'application/json'
+);
 print $json_text;