From aba9c8cbf35d1aea12ba146d5c936a99e693b4bb Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sat, 10 Jan 2004 19:19:53 +0000 Subject: [PATCH] Add function from php.net manual page for php < 4.3.0 --- redirect.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/redirect.php b/redirect.php index 4cccd1d3e1..89d2707e62 100644 --- a/redirect.php +++ b/redirect.php @@ -22,6 +22,16 @@ "' */ + if(!function_exists('html_entity_decode')) + { + function html_entity_decode($given_html, $quote_style = ENT_QUOTES) + { + $trans_table = array_flip(get_html_translation_table( HTML_SPECIALCHARS, $quote_style)); + $trans_table['''] = "'"; + return(strtr($given_html, $trans_table)); + } + } + if($_GET['go']) { Header('Location: ' . html_entity_decode(urldecode($_GET['go'])));