Skip to content
Browse files

Merge branch 'MDL-29712-MOODLE_21_STABLE' of git://github.com/mouneyr…

…ac/moodle into MOODLE_21_STABLE
  • Loading branch information...
2 parents 259739c + 87bf399 commit 2fbbfb0187de0fcc9677f2e24f10c0384bcbd936 @samhemelryk samhemelryk committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 webservice/rest/locallib.php
View
6 webservice/rest/locallib.php
@@ -95,9 +95,9 @@ protected function send_error($ex=null) {
$this->send_headers();
$xml = '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
$xml .= '<EXCEPTION class="'.get_class($ex).'">'."\n";
- $xml .= '<MESSAGE>'.htmlentities($ex->getMessage(), ENT_COMPAT, 'UTF-8').'</MESSAGE>'."\n";
+ $xml .= '<MESSAGE>'.htmlspecialchars($ex->getMessage(), ENT_COMPAT, 'UTF-8').'</MESSAGE>'."\n";
if (debugging() and isset($ex->debuginfo)) {
- $xml .= '<DEBUGINFO>'.htmlentities($ex->debuginfo, ENT_COMPAT, 'UTF-8').'</DEBUGINFO>'."\n";
+ $xml .= '<DEBUGINFO>'.htmlspecialchars($ex->debuginfo, ENT_COMPAT, 'UTF-8').'</DEBUGINFO>'."\n";
}
$xml .= '</EXCEPTION>'."\n";
echo $xml;
@@ -134,7 +134,7 @@ protected static function xmlize_result($returns, $desc) {
if (is_null($returns)) {
return '<VALUE null="null"/>'."\n";
} else {
- return '<VALUE>'.htmlentities($returns, ENT_COMPAT, 'UTF-8').'</VALUE>'."\n";
+ return '<VALUE>'.htmlspecialchars($returns, ENT_COMPAT, 'UTF-8').'</VALUE>'."\n";
}
} else if ($desc instanceof external_multiple_structure) {

0 comments on commit 2fbbfb0

Please sign in to comment.
Something went wrong with that request. Please try again.