]> git.wh0rd.org - tt-rss.git/commitdiff
sanitize: disallow width and height attributes for images
authorAndrew Dolgov <noreply@fakecake.org>
Sun, 11 Feb 2018 13:47:19 +0000 (16:47 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sun, 11 Feb 2018 13:47:19 +0000 (16:47 +0300)
include/functions.php

index ebf4021ae627d39261932771d43b2bc816557795..efa4ec8e7d5bc8d4cee7443a266bf638f5ddb3d5 100755 (executable)
                        if ($entry->nodeName == 'img') {
                                $entry->setAttribute('referrerpolicy', 'no-referrer');
 
+                               $entry->removeAttribute('width');
+                               $entry->removeAttribute('height');
+
                                if ($entry->hasAttribute('src')) {
                                        $is_https_url = parse_url($entry->getAttribute('src'), PHP_URL_SCHEME) === 'https';