From 164e8c8b76395b5bbed315493d166e91db63a6c0 Mon Sep 17 00:00:00 2001 From: Damien Alexandre Date: Fri, 3 Jan 2014 11:57:13 +0100 Subject: [PATCH] Fix wrong call to mb_convert_encoding in resolve() The charset is extracted from the ContentType, and mb_convert_encoding is called, but the actual $content is never converted to UTF-8 ($content is not passed by reference in this method). --- Embed/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Embed/Url.php b/Embed/Url.php index 79d8f234..101b7c40 100644 --- a/Embed/Url.php +++ b/Embed/Url.php @@ -69,7 +69,7 @@ private function resolve () { $charset = substr(strtoupper(strstr($charset, '=')), 1); if (!empty($charset) && ($charset !== 'UTF-8')) { - @mb_convert_encoding($content, 'UTF-8', $charset); + $content = @mb_convert_encoding($content, 'UTF-8', $charset); } } else if (strpos($this->getResult('content_type'), '/') !== false) { $this->result['mime_type'] = $this->getResult('content_type');