diff --git a/api/etemplate.php b/api/etemplate.php index a5c1025106..5df2b06674 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -183,6 +183,12 @@ function send_template() ) . ">"; }, $str); + // Change size=# attribute to width, size is small|medium|large with shoelace + $str = preg_replace_callback('#<([^/>]+) size="([[:digit:]]+)"([^/>]+?)/>#su', static function ($matches) + { + return "<{$matches[1]} width=\"{$matches[2]}ex\" {$matches[3]}/>"; + }, $str); + // handling of select and taglist widget, incl. removing of type attribute $str = preg_replace_callback('#<(select|taglist|listbox)(-[^ ]+)? ([^>]+?)(/|>(.*?)#s', static function (array $matches) {