[Koha-patches] [PATCH] Fixes bug 4448: &'s in itemcallnumber

Ian Walls ian.walls at bywatersolutions.com
Wed May 5 17:14:54 CEST 2010


---
 C4/XSLT.pm |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/C4/XSLT.pm b/C4/XSLT.pm
index f1fc9db..e67aa54 100644
--- a/C4/XSLT.pm
+++ b/C4/XSLT.pm
@@ -206,10 +206,11 @@ sub buildKohaItemsNamespace {
             $status = "available";
         }
         my $homebranch = $branches->{$item->{homebranch}}->{'branchname'};
+	 my $itemcallnumber = $item->{itemcallnumber} || '';
+        $itemcallnumber =~ s/\&/\&amp\;/g;
         $xml.= "<item><homebranch>$homebranch</homebranch>".
 		"<status>$status</status>".
-		(defined $item->{'itemcallnumber'} ? "<itemcallnumber>".$item->{'itemcallnumber'}."</itemcallnumber>" 
-                                           : "<itemcallnumber />")
+		"<itemcallnumber>".$itemcallnumber."</itemcallnumber>"
         . "</item>";
 
     }
-- 
1.5.6.5




More information about the Koha-patches mailing list