Fix html tag closing

This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-26 20:59:45 +01:00
parent 507f3b3b71
commit 041e19e418

View file

@ -334,7 +334,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage,
}
// New method for custom SEO
if (strpos($objectpage->content, 'define("__SEO_PAGE_LANG__"') !== false) {
$tplcontent .= '$tmp = preg_replace("/^<html lang=\"[a-z]+\"/ms", "<html lang=\"" . dolPrintHTMLForAttribute(constant("__SEO_PAGE_LANG__"), 1) . "\">", $tmp);'."\n";
$tplcontent .= '$tmp = preg_replace("/^<html lang=\"[a-z]+\"/ms", "<html lang=\"" . dolPrintHTMLForAttribute(constant("__SEO_PAGE_LANG__"), 1) . "\"", $tmp);'."\n";
}
if (strpos($objectpage->content, 'define("__SEO_PAGE_KEYWORDS__"') !== false) {
$tplcontent .= '$tmp = preg_replace("/^<meta name=\"keywords\" content=\".*?\" \/>/ms", "<meta name=\"keywords\" content=\"" . dolPrintHTMLForAttribute(constant("__SEO_PAGE_KEYWORDS__"), 1) . "\" />", $tmp);'."\n";