LP#1442276 Encode UTF8 output of XSLT transforms
authorDan Scott <dscott@laurentian.ca>
Fri, 3 Mar 2017 06:26:53 +0000 (01:26 -0500)
committerDan Scott <dscott@laurentian.ca>
Sun, 12 Mar 2017 04:09:55 +0000 (23:09 -0500)
The XML::LibXSLT::output_string() method was deprecated in favour of
output_as_bytes() and output_as_chars(). The latter always generates
UTF8 output as characters, which is what we need, while output_string()
behaviour depended on the stylesheet.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>

Open-ILS/src/sql/Pg/002.functions.config.sql

index 6ebdf1d..7eaed4c 100644 (file)
@@ -91,7 +91,7 @@ CREATE OR REPLACE FUNCTION evergreen.oils_xslt_process(TEXT, TEXT) RETURNS TEXT
   $_SHARED{'_xslt_process'}{stylesheets}{$xslt} = $stylesheet
     unless ($_SHARED{'_xslt_process'}{stylesheets}{$xslt});
 
-  return $stylesheet->output_string(
+  return $stylesheet->output_as_chars(
     $stylesheet->transform(
       $parser->parse_string($doc)
     )