Fix ul must contains li only

This commit is contained in:
Laurent Destailleur 2023-02-17 01:53:24 +01:00
parent a776b65be0
commit 33a74b65b3

View File

@ -1562,9 +1562,9 @@ class Website extends CommonObject
if ($countrycode == 'us') {
$label = preg_replace('/\s*\(.*\)/', '', $label);
}
$out .= '<a href="'.$url.substr($languagecodeselected, 0, 2).'"><li><img height="12px" src="/medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/><span class="websitecomponentlilang">'.$label.'</span>';
$out .= '<li><a href="'.$url.substr($languagecodeselected, 0, 2).'"><img height="12px" src="/medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/><span class="websitecomponentlilang">'.$label.'</span>';
$out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />';
$out .= '</li></a>';
$out .= '</a></li>';
}
$i = 0;
if (is_array($languagecodes)) {
@ -1583,11 +1583,11 @@ class Website extends CommonObject
if ($countrycode == 'us') {
$label = preg_replace('/\s*\(.*\)/', '', $label);
}
$out .= '<a href="'.$url.substr($languagecode, 0, 2).'"><li><img height="12px" src="/medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/><span class="websitecomponentlilang">'.$label.'</span>';
$out .= '<li><a href="'.$url.substr($languagecode, 0, 2).'"><img height="12px" src="/medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/><span class="websitecomponentlilang">'.$label.'</span>';
if (empty($i) && empty($languagecodeselected)) {
$out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />';
}
$out .= '</li></a>';
$out .= '</a></li>';
$i++;
}
}