From 7e81b69b74c9ff725cff2829123cfd3335cb57a0 Mon Sep 17 00:00:00 2001 From: ralf Date: Sat, 6 Aug 2022 12:11:41 +0200 Subject: [PATCH] support empty attribute values --- api/etemplate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/etemplate.php b/api/etemplate.php index e015d7f633..4eed2017da 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -424,7 +424,7 @@ function send_template() */ function parseAttrs($str) { - if (!preg_match_all('/(^|\s)([a-z\d_-]+)="([^"]+)"/i', $str, $attrs, PREG_PATTERN_ORDER)) + if (!preg_match_all('/(^|\s)([a-z\d_-]+)="([^"]*)"/i', $str, $attrs, PREG_PATTERN_ORDER)) { throw new Exception("Can NOT parse attributes from '$str'"); }