From 0b3cd206c350dad7a244e519c115fa0c03256df4 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 2 Jan 2020 20:35:59 -0500 Subject: [PATCH] Remove harmful HTML decode/encode in BBCode::scaleExternalImages --- src/Content/Text/BBCode.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 11caeb6ec..4a2a75ece 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -444,7 +444,7 @@ class BBCode } // Picture addresses can contain special characters - $s = htmlspecialchars_decode($srctext); + $s = $srctext; $matches = null; $c = preg_match_all('/\[img.*?\](.*?)\[\/img\]/ism', $s, $matches, PREG_SET_ORDER); @@ -501,8 +501,6 @@ class BBCode } } - // replace the special char encoding - $s = htmlspecialchars($s, ENT_NOQUOTES, 'UTF-8'); return $s; }