From: konrad Date: Sun, 13 Jan 2008 20:16:50 +0000 (+0000) Subject: fix encoding issues with machine interface X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=9fbd4537f4087eddaa07f09e40357d91a014b1e1;p=konrad%2Fsmoke.git fix encoding issues with machine interface git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@86 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/www/inc/event.php b/www/inc/event.php index 517fff6..a694347 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",htmlentities($ev["title"])); + $nod=$xml->createElement("Event",$ev["title"]); $nod->setAttribute("id",$ev["eventid"]); $nod->setAttribute("start",$ev["starttime"]); $root->appendChild($nod); @@ -164,16 +164,16 @@ 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",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()))); + $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())); if($ev->isCancelled()) $nod->appendChild($xml->createElement("CancelReason",$ev->getCancelReason())); $root->appendChild($nod); } $xml->appendChild($root); - echo $xml->saveXml(); + print($xml->saveXml()); } /**Machine-Interface: set an event (it's not possible to set from Web-Browser)*/ diff --git a/www/machine.php b/www/machine.php index cf024a2..f6eeb2e 100644 --- a/www/machine.php +++ b/www/machine.php @@ -34,12 +34,6 @@ if(isset($HTTP_RAW_POST_DATA)){ $REQUESTDATA=$HTTP_RAW_POST_DATA; } -/**provided to encode data into UTF-8 for transport*/ -function xmlentities($str) -{ - return htmlentities($str); -} - //initialize basics include("inc/loader.php");