From 1c2147d60ecca2be4db3a8aade3913243312581e Mon Sep 17 00:00:00 2001 From: Cerdic <cedric@yterium.com> Date: Mon, 13 Nov 2006 12:54:29 +0000 Subject: [PATCH] ecrire les tags fermants (</truc>) correctement meme si le tag ouvrant possede des attributs --- ecrire/inc/xml.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ecrire/inc/xml.php b/ecrire/inc/xml.php index d07a9a8b10..b514bfb8c8 100644 --- a/ecrire/inc/xml.php +++ b/ecrire/inc/xml.php @@ -95,7 +95,11 @@ function spip_xml_aplatit($arbre,$separateur = " "){ if (is_array($feuille)){ if ($tag!==intval($tag)){ $f = spip_xml_aplatit($feuille); - if (strlen($f)) $s.="<$tag>$f</$tag>"; + if (strlen($f)) { + $tagf = explode(" ",$tag); + $tagf = $tag[0]; + $s.="<$tag>$f</$tagf>"; + } else $s.="<$tag/>"; } else -- GitLab