diff options
-rw-r--r-- | it_url.class | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class index 5ed6294..7ed0bce 100644 --- a/it_url.class +++ b/it_url.class @@ -774,8 +774,11 @@ function redirect($url = null, $type = "temporary") it::fatal("Invalid redirect type '$type', must be 'permanent' or 'temporary'"); $url = preg_replace("/[\r\n].*/", '', it_url::absolute($url)); # Security: cut after CR/LF - if (EDC('noredir')) + if (EDC('noredir')) { + if (!function_exists('a')) + new it_html(); echo a(array('href' => $url), Q($url)) . Q(" (HTTP/1.1 $code, $type redirect)") . br() . Q("Trace: " . it_debug::backtrace()); + } else header('Location: ' . it_untaint($url, TC_SELF), true, $code); exit; |