From 656c155951cebfdc57ef9a2285aaf6637c11d5a2 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 26 Jul 2022 17:36:22 +0200 Subject: [PATCH] fix button tags over multiple lines were not processed correctly --- api/etemplate.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/etemplate.php b/api/etemplate.php index e8bce13fb1..b061bfefe7 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -13,7 +13,7 @@ use EGroupware\Api; // add et2- prefix to following widgets/tags, if NO --> - $str = preg_replace_callback('##u', function ($matches) use ($name) { + $str = preg_replace_callback('##s', function ($matches) use ($name) { $tag = 'et2-button'; - preg_match_all('/(^| )([a-z0-9_-]+)="([^"]+)"/i', $matches[2], $attrs, PREG_PATTERN_ORDER); + preg_match_all('/(^|\s)([a-z0-9_-]+)="([^"]+)"/i', $matches[2], $attrs, PREG_PATTERN_ORDER); $attrs = array_combine($attrs[2], $attrs[3]); // replace buttononly tag with noSubmit="true" attribute if (!empty($matches[1]))