Replace htmlentities() with htmlspecialchars() to fix issue #561
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index bb95ca1..a9f8d9c 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -437,7 +437,14 @@
 		{
 			// 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))
 		{