Skip to content
Extraits de code Groupes Projets
Valider fd597d1d rédigé par cerdic's avatar cerdic
Parcourir les fichiers

trouver les <hn> avec une class aussi pour generer le title

parent af4e1d57
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -60,8 +60,8 @@ function interdire_acces($ok=false) { ...@@ -60,8 +60,8 @@ function interdire_acces($ok=false) {
function f_title_auto($texte){ function f_title_auto($texte){
if (strpos($texte,'<title>')===false if (strpos($texte,'<title>')===false
AND AND
(preg_match(",<h1>(.+)</h1>,Uims", $texte, $match) (preg_match(",<h1[^>]*>(.+)</h1>,Uims", $texte, $match)
OR preg_match(",<h[23]>(.+)</h[23]>,Uims", $texte, $match)) OR preg_match(",<h[23][^>]*>(.+)</h[23]>,Uims", $texte, $match))
AND $match = trim($match[1]) AND $match = trim($match[1])
AND ($p = strpos($texte,'<head>'))!==FALSE) { AND ($p = strpos($texte,'<head>'))!==FALSE) {
if (!$nom_site_spip = textebrut(typo($GLOBALS['meta']["nom_site"]))) if (!$nom_site_spip = textebrut(typo($GLOBALS['meta']["nom_site"])))
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter