From b195637240bbbc7c3dc7ee0585f0e4cd39cb9d81 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2012 11:01:48 +0200 Subject: Replace htmlentities() with htmlspecialchars() to fix issue #561 --- system/libraries/Xmlrpc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index bb95ca145..a9f8d9c38 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -437,7 +437,14 @@ class XML_RPC_Response { // error $this->errno = $code; - $this->errstr = htmlentities($fstr); + if ( ! is_php('5.4')) + { + $this->errstr = htmlspecialchars($fstr, ENT_NOQUOTES, 'UTF-8'); + } + else + { + $this->errstr = htmlspecialchars($fstr, ENT_XML1 | ENT_NOQUOTES, 'UTF-8'); + } } else if ( ! is_object($val)) { -- cgit v1.2.3-24-g4f1b