[Koha-patches] [PATCH] Translated & to & in xmlrecord

David Birmingham dbirmingham at ptfs.com
Wed Dec 2 22:23:07 CET 2009


If the homebranch tag had an & in its name, then the XML wouldn't parse
correctly.  As a result, if XSLT was turned on, "No copies available" would
always be displayed.
---
 C4/XSLT.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/C4/XSLT.pm b/C4/XSLT.pm
index fb427c3..8a67e04 100644
--- a/C4/XSLT.pm
+++ b/C4/XSLT.pm
@@ -133,6 +133,7 @@ sub XSLTParse4Display {
     }
     $sysxml .= "</sysprefs>\n";
     $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/;
+    $xmlrecord =~ s/\& /\&amp\; /;
 
     my $parser = XML::LibXML->new();
     # don't die when you find &, >, etc
-- 
1.5.6.5




More information about the Koha-patches mailing list