Bugzilla – Attachment 16905 Details for
Bug 6554
Resolve encoding problems with corrected UTF8 handling in templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6554 - followup - encode output, XSLT encoding from templates
Bug-6554---followup---encode-output-XSLT-encoding-.patch (text/plain), 1.57 KB, created by
Dobrica Pavlinusic
on 2013-03-26 19:51:42 UTC
(
hide
)
Description:
Bug 6554 - followup - encode output, XSLT encoding from templates
Filename:
MIME Type:
Creator:
Dobrica Pavlinusic
Created:
2013-03-26 19:51:42 UTC
Size:
1.57 KB
patch
obsolete
>From 763083c828fc36a2f6dec691f7e22c03d306ca10 Mon Sep 17 00:00:00 2001 >From: M. de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 26 Mar 2013 20:12:36 +0100 >Subject: [PATCH] Bug 6554 - followup - encode output, XSLT encoding from templates > >Encode output data instead of using binmode to be more compliant >with various usage (e.g. plack). > >XSLT output_string seems to be depriciated call, decoding of >newxmlrecord seems to be not necessary. >--- > C4/Output.pm | 3 ++- > C4/XSLT.pm | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Output.pm b/C4/Output.pm >index 458b92f..1c70e1a 100644 >--- a/C4/Output.pm >+++ b/C4/Output.pm >@@ -308,8 +308,9 @@ sub output_with_http_headers { > } > > sub output_html_with_http_headers { >- binmode( STDOUT, ":encoding(utf8)" ); > my ( $query, $cookie, $data, $status ) = @_; >+ $data =~ s/\&\;amp\; /\&\; /g && warn "DEBUG: fix double &"; >+ utf8::encode($data); > output_with_http_headers( $query, $cookie, $data, 'html', $status ); > } > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 139ddd2..2b45c39 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -221,7 +221,8 @@ sub XSLTParse4Display { > $stylesheet->{$xslfilename} = $xslt->parse_stylesheet($style_doc); > } > my $results = $stylesheet->{$xslfilename}->transform($source); >- my $newxmlrecord = $stylesheet->{$xslfilename}->output_string($results); >+ my $newxmlrecord = $stylesheet->{$xslfilename}->output_as_chars($results); >+ #utf8::decode($newxmlrecord); # Bug 6554 - XSLT templates have utf-8 in header > return $newxmlrecord; > } > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6554
:
4558
|
4560
|
4561
|
4562
|
4563
|
4564
|
5962
|
6041
|
6065
|
6070
|
6071
|
6072
|
6073
|
6076
|
6077
|
6078
|
6079
|
6080
|
6083
|
6084
|
6085
|
6108
|
10118
|
16780
|
16797
|
16857
|
16905
|
16929
|
16930
|
16931
|
16932
|
16960
|
16961
|
16962
|
16963
|
16964
|
16966
|
16968
|
16969
|
16984
|
16985
|
16986
|
16987
|
16988
|
16989
|
17179
|
17186
|
17187
|
17327
|
17328
|
18746
|
18747
|
18749
|
18750
|
21318
|
21399
|
21478
|
21488
|
21506
|
21509
|
21581
|
21629
|
21631
|
21632
|
21682
|
21937
|
21955
|
21978
|
21980
|
21981
|
23107
|
23140