support empty attribute values

This commit is contained in:
ralf 2022-08-06 12:11:41 +02:00
parent 4ff66f0fd7
commit 7e81b69b74

View File

@ -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'");
}