replace single quote enclosing attribute values with double quotes

This commit is contained in:
ralf 2022-06-13 09:57:24 +02:00
parent 6bdf3e2f01
commit f6471eabb1

View File

@ -64,6 +64,9 @@ function send_template()
}
elseif(($str = file_get_contents($path)) !== false)
{
// replace single quote enclosing attribute values with double quotes
$str = preg_replace("#([a-z_-]+)='([^']*)'([ />])#i", '$1="$2"$3', $str);
// fix <menulist...><menupopup type="select-*"/></menulist> --> <select type="select-*" .../>
$str = preg_replace('#<menulist([^>]*)>[\r\n\s]*<menupopup([^>]+>)[\r\n\s]*</menulist>#', '<select$1$2', $str);