From 89d50d7ed0402806fc9ae008e7b39671fa73e7c3 Mon Sep 17 00:00:00 2001 From: konrad Date: Sun, 16 Dec 2007 21:20:47 +0000 Subject: [PATCH] fix encoding of special chars in xml git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@81 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- www/inc/event.php | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/www/inc/event.php b/www/inc/event.php index df203f3..517fff6 100644 --- a/www/inc/event.php +++ b/www/inc/event.php @@ -34,7 +34,7 @@ function getAllEventsXml() $root=$xml->createElement("EventList"); if(count($all)>0) foreach($all as $k => $ev){ - $nod=$xml->createElement("Event",$ev["title"]); + $nod=$xml->createElement("Event",htmlentities($ev["title"])); $nod->setAttribute("id",$ev["eventid"]); $nod->setAttribute("start",$ev["starttime"]); $root->appendChild($nod); @@ -164,10 +164,10 @@ function getEventsXml($evts) $nod->setAttribute("capacity",$ev->getCapacity()); $nod->setAttribute("defaultprice",$ev->getDefaultPrice()); $nod->setAttribute("cancelled",$ev->isCancelled()?"true":"false"); - $nod->appendChild($xml->createElement("Title",$ev->getTitle())); - $nod->appendChild($xml->createElement("Artist",$ev->getArtist())); - $nod->appendChild($xml->createElement("Room",$ev->getRoomId())); - $nod->appendChild($xml->createElement("Description",$ev->getDescription())); + $nod->appendChild($xml->createElement("Title",htmlentities($ev->getTitle()))); + $nod->appendChild($xml->createElement("Artist",htmlentities($ev->getArtist()))); + $nod->appendChild($xml->createElement("Room",htmlentities($ev->getRoomId()))); + $nod->appendChild($xml->createElement("Description",htmlentities($ev->getDescription()))); if($ev->isCancelled()) $nod->appendChild($xml->createElement("CancelReason",$ev->getCancelReason())); $root->appendChild($nod); -- 1.7.2.5