(_DIR_RESTREINT?1:2) AND !preg_match(",^(\w+:)?//,",$url)){ include_spip("inc/filtres_mini"); $url = url_absolue($url); } if ($x = _request('transformer_xml')) $url = parametre_url($url, 'transformer_xml', $x, '&'); if (defined('_AJAX') AND _AJAX) $url = parametre_url($url, 'var_ajax_redir', 1, '&'); // ne pas laisser passer n'importe quoi dans l'url $url = str_replace(array('<','"'),array('<','"'),$url); // interdire les url inline avec des pseudo-protocoles : if ( (preg_match(",data:,i",$url) AND preg_match("/base64\s*,/i",$url)) OR preg_match(",(javascript|mailto):,i",$url) ) $url ="./"; // Il n'y a que sous Apache que setcookie puis redirection fonctionne include_spip('inc/cookie'); if ((!$equiv AND !spip_cookie_envoye()) OR ((strncmp("Apache", $_SERVER['SERVER_SOFTWARE'],6)==0) OR defined('_SERVER_APACHE'))) { @header("Location: " . $url); $equiv=""; } else { @header("Refresh: 0; url=" . $url); $equiv = ""; } include_spip('inc/lang'); if ($status!=302) http_status($status); echo '',"\n", html_lang_attributes(),'
', $equiv,'