Insert style attribute with width value
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 1 Feb 2024 10:55:06 +0000 (11:55 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Thu, 1 Feb 2024 10:55:06 +0000 (11:55 +0100)
wcfsetup/install/files/lib/system/html/metacode/upcast/WsmMetacodeUpcast.class.php

index 8ea057a61b8cb9766bf51763fdc5a971a56e36bb..41bea3ca28d28072e8c8c813416ca22b66edba0c 100644 (file)
@@ -48,6 +48,7 @@ final class WsmMetacodeUpcast implements IMetacodeUpcast
         } else {
             $figure->setAttribute('class', 'image');
         }
+        $figure->setAttribute('style', \sprintf('width: %dpx;', \intval($width)));
         $figure->appendChild($element);
         return $figure;
     }