From 49834fcd8077fbc17ac3be24b815ce40cf589bcb Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Sun, 2 Dec 2007 21:55:03 +0000 Subject: [PATCH] retablir le xml_hack par defaut sur recuperer_fond() ; ca debug le selecteur_generique --- ecrire/inc/utils.php | 4 ++-- ecrire/public.php | 6 +++--- ecrire/public/assembler.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index 1a0bec2f35..6bf5e63f00 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -1346,8 +1346,8 @@ function evaluer_fond ($fond, $contexte=array(), $options=array(), $connect=null ob_end_clean(); } - if (!isset($options['protect_xml']) - AND isset($page['entetes']['X-Xml-Hack'])) + if (isset($page['entetes']['X-Xml-Hack']) + AND isset($options['protect_xml']) AND $options['protect_xml']) $page['texte'] = str_replace("<\1?xml", '<'.'?xml', $page['texte']); $GLOBALS['_INC_PUBLIC']--; diff --git a/ecrire/public.php b/ecrire/public.php index 14d2112158..426a6d2eb5 100644 --- a/ecrire/public.php +++ b/ecrire/public.php @@ -213,9 +213,9 @@ if ($GLOBALS['_INC_PUBLIC']>0) { } } } - + if ($html) $page = analyse_js_ajoutee($page); - + // Passer la main au debuggueur le cas echeant if ($var_mode == 'debug') { @@ -235,7 +235,7 @@ if ($GLOBALS['_INC_PUBLIC']>0) { // // Report du hack pour <?xml (cf. public/compiler.php) - if (strpos($page['texte'],"<\1?xml")!==FALSE) + if ($xml_hack) $page['texte'] = str_replace("<\1?xml", '<'.'?xml', $page['texte']); // (c'est ici qu'on fait var_recherche, tidy, boutons d'admin, diff --git a/ecrire/public/assembler.php b/ecrire/public/assembler.php index 623d11c5a0..9f46faf141 100644 --- a/ecrire/public/assembler.php +++ b/ecrire/public/assembler.php @@ -550,7 +550,7 @@ function message_erreur_404 ($erreur= "") { // fonction permettant de recuperer le resultat du calcul d'un squelette // pour une inclusion dans un flux // http://doc.spip.org/@recuperer_fond -function recuperer_fond($fond, $contexte=array(), $protect_xml=false, $trim=true, $connect='') { +function recuperer_fond($fond, $contexte=array(), $protect_xml=true, $trim=true, $connect='') { $options = array( 'protect_xml' => $protect_xml, 'trim' => $trim -- GitLab