From 822cbf2a87ab2eaaa458ef1849d6f27d752ca9f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9?= Date: Fri, 15 Mar 2013 18:25:22 +0100 Subject: [PATCH] Let htmLawed keep width+height for images --- include/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 54b84032..3927a5b6 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2552,7 +2552,8 @@ $res = trim($str); if (!$res) return ''; $config = array('safe' => 1, 'deny_attribute' => 'style, width, height, class, id', 'comment' => 1, 'cdata' => 1, 'balance' => 0); - $res = htmLawed($res, $config); + $spec = 'img=width,height'; + $res = htmLawed($res, $config, $spec); if (get_pref($link, "STRIP_IMAGES", $owner)) { $res = preg_replace('/]+>/is', '', $res); -- 2.39.5