From 0bbca1dcbf4eabe61acee147875332b144b42e58 Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 27 Jun 2012 04:08:55 +0000 Subject: bug 2666 Fix invalid xml on web service output with xml format git-svn-id: http://piwigo.org/svn/trunk@16074 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/ws_protocols/rest_encoder.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/ws_protocols/rest_encoder.php b/include/ws_protocols/rest_encoder.php index a8b002b95..041540a3e 100644 --- a/include/ws_protocols/rest_encoder.php +++ b/include/ws_protocols/rest_encoder.php @@ -59,6 +59,11 @@ class PwgXmlWriter } $this->_indentLevel++; $this->_indent(); + $diff = ord($name[0])-ord('0'); + if ($diff>=0 && $diff<=9) + { + $name='_'.$name; + } $this->_output( '<'.$name ); $this->_lastTagOpen = true; array_push( $this->_elementStack, $name); -- cgit v1.2.3