aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_protocols
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-06-27 04:09:54 +0000
committerrvelices <rv-github@modusoptimus.com>2012-06-27 04:09:54 +0000
commit9f809077e0b9151a32b5a38a9240a1fb5ee68901 (patch)
treeaeb13bc15948df0a07b02d72bbe90ea83233199c /include/ws_protocols
parent9937863533b9877e70a8f5242bb85a66d5b741ef (diff)
bug 2666 Fix invalid xml on web service output with xml format (merge from trunk to branch 2.4)
git-svn-id: http://piwigo.org/svn/branches/2.4@16075 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/ws_protocols')
-rw-r--r--include/ws_protocols/rest_encoder.php5
1 files changed, 5 insertions, 0 deletions
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);