JS entités
This commit is contained in:
parent
df88e5a195
commit
19c6c403d7
@ -562,8 +562,6 @@ class helper
|
||||
// Supprime les tabulations, espaces, nouvelles lignes, etc...
|
||||
$js = str_replace(["\r\n", "\r", "\t", "\n", ' ', ' ', ' '], '', $js);
|
||||
$js = preg_replace(['(( )+\))', '(\)( )+)'], ')', $js);
|
||||
// Convertir les codes entités
|
||||
$js = htmlspecialchars_decode($js);
|
||||
// Retourne le js minifié
|
||||
return $js;
|
||||
}
|
||||
|
@ -1043,8 +1043,9 @@ class layout extends common
|
||||
if ($this->core->output['inlineScript']) {
|
||||
$inlineScript = implode($this->core->output['inlineScript']);
|
||||
}
|
||||
echo '<script defer>' . helper::minifyJs( $coreScript) . '</script>';
|
||||
echo '<script defer>' . helper::minifyJs( $inlineScript) . '</script>';
|
||||
echo '<script defer>' . helper::minifyJs($coreScript . $this->core->output['script'] . htmlspecialchars_decode($inlineScript)) . '</script>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user