From bcf9d6b93719f9a0a3bfe9b2d325ded31408ca8b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 22 Aug 2022 13:29:08 +0200 Subject: [PATCH] Do not drop the size attribute if we are setting new shoelace size format --- api/etemplate.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/etemplate.php b/api/etemplate.php index df63d2125b..84afd2c4d1 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -393,7 +393,8 @@ function send_template() } // Change size=# attribute to width, size is small|medium|large with Shoelace - if (isset($attrs['size'])) + // Do not drop size if we're setting shoelace size format in the template + if (isset($attrs['size']) && !preg_match('/small|medium|large/',$attrs['size'])) { $attrs['width'] = (int)$attrs['size'].'em'; unset($attrs['size']);