Valider bde436ef rédigé par cerdic's avatar cerdic
Parcourir les fichiers

Fix insertion de alt via la fonction http_img_pack :

false => pas d'attribut alt du tout (c'est mal mais ce peut etre volontaire)
'' => alt present avec une valeur vide (pour indiquer que l'image est non signifiante)
null => utiliser title
tout autre valeur => utilisee dans attribut alt
parent 026ff7e7
Chargement en cours
Chargement en cours
Chargement en cours
Chargement en cours
+10 −1
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -3411,7 +3411,16 @@ function http_img_pack($img, $alt, $atts = '', $title = '', $options = array())
	if (file_exists($img_file)) {
		$img_file = timestamp($img_file);
	}
	return "<img src='$img_file' alt='" . attribut_html($alt ? $alt : $title) . "'"
	if ($alt === false) {
		$alt = '';
	}
	elseif($alt or $alt==='') {
		$alt = " alt='".attribut_html($alt)."'";
	}
	else {
		$alt = " alt='".attribut_html($title)."'";
	}
	return "<img src='$img_file'$alt"
	. ($title ? ' title="' . attribut_html($title) . '"' : '')
	. " " . ltrim($atts)
	. " />";