Translated & to & in xmlrecord
authorDavid Birmingham <dbirmingham@ptfs.com>
Wed, 2 Dec 2009 21:23:07 +0000 (16:23 -0500)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Sun, 20 Dec 2009 13:26:35 +0000 (14:26 +0100)
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

index fb427c3..8a67e04 100644 (file)
@@ -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