From f83355920449ab148f4c63094424daabac8fa6b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 26 Apr 2021 16:51:29 +0200 Subject: [PATCH] Use width / height attributes for attachments instead of inline CSS This plays more nicely with a hypothetical future content security policy and is more consistent with other places. --- .../install/files/lib/system/bbcode/AttachmentBBCode.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php index ca6163326b..5fe770b73a 100644 --- a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php @@ -155,7 +155,7 @@ class AttachmentBBCode extends AbstractBBCode $result = ''; + )) . '"' . ($imageClasses ? ' class="' . $imageClasses . '"' : '') . ' width="' . ($attachment->hasThumbnail() ? $attachment->thumbnailWidth : $attachment->width) . '" height="' . ($attachment->hasThumbnail() ? $attachment->thumbnailHeight : $attachment->height) . '" alt="">'; } if (!$hasParentLink && $attachment->hasThumbnail() && $attachment->canDownload()) { $result = '