'); static $t2 = array('&', '<', '>'); return '
' . str_replace($t1, $t2, $t) . ''; } // http://doc.spip.org/@filtre_text_csv_dist function filtre_text_csv_dist($t) { include_spip('inc/csv'); list($entete, $lignes) = analyse_csv($t); foreach ($lignes as &$l) $l = join('|', $l); $corps = join("\n", $lignes) . "\n"; $corps = $caption . "\n|{{" . join('}}|{{',$entete) . "}}|" . "\n|" . str_replace("\n", "|\n|",$corps); $corps = str_replace('"#','"',$corps); include_spip('inc/texte'); return propre($corps); } // Incrustation de HTML, si on est capable de le securiser // sinon, afficher le source // http://doc.spip.org/@filtre_text_html_dist function filtre_text_html_dist($t) { if (!preg_match(',^(.*?)]*>(.*),is', $t, $r)) return appliquer_filtre($t,'text/plain'); list(,$h,$t) = $r; $style = ''; // recuperer les styles internes if (preg_match_all(',,is', $h, $r, PREG_PATTERN_ORDER)) $style = join("\n",$r[1]); // ... et externes include_spip('inc/distant'); if (preg_match_all(',]+type=.text/css[^>]*>,is', $h, $r, PREG_PATTERN_ORDER)) foreach($r[0] as $l) { preg_match("/href='([^']*)'/", str_replace('"',"'",$l), $m); $style .= "\n/* $l */\n" . str_replace('<','',recuperer_page($m[1])); } // Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ? $t = safehtml(preg_replace(',