[Koha-patches] [PATCH 28/92] Translated & to & in xmlrecord

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Tue Dec 22 01:20:21 CET 2009


From: David Birmingham <dbirmingham at ptfs.com>

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.6.3.3




More information about the Koha-patches mailing list