From 43941f998ff21bb607195278c4dfa9b0111b97c7 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Thu, 2 Nov 2017 16:50:16 +0300 Subject: [PATCH] Change. Treat `sofia xmlstatus` as UTF8 (#2901) FS Always mark xml as ISO-8859-1, but pass info as-is. So if user send its contact info as UTF-8 then we get corrupted xml. But RFC describe text as UTF8 RFC 3261 - 25.1 Basic Rules ``` qdtext = LWS / %x21 / %x23-5B / %x5D-7E / UTF8-NONASCII ``` --- app/registrations/resources/classes/registrations.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/registrations/resources/classes/registrations.php b/app/registrations/resources/classes/registrations.php index 8314af313d..61246b95c9 100644 --- a/app/registrations/resources/classes/registrations.php +++ b/app/registrations/resources/classes/registrations.php @@ -68,6 +68,7 @@ if (!class_exists('registrations')) { $xml_response = str_replace("", "", $xml_response); if (strlen($xml_response) > 101) { try { + $xml_response = str_ireplace("", "", $xml_response); $xml = new SimpleXMLElement($xml_response); } catch(Exception $e) {