1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 22:40:39 +02:00

ok, i am an idiot...

git-svn-id: file:///svn/phpbb/trunk@6548 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-11-03 21:05:25 +00:00
parent b0989c3f4d
commit 7ab232a455
28 changed files with 75 additions and 115 deletions

View File

@@ -967,44 +967,4 @@ function utf8_clean_string($text)
return $text;
}
if (version_compare(phpversion(), '5', '>='))
{
/**
* @ignore
*/
function utf8_html_entity_decode($string, $quote_style = ENT_COMPAT)
{
return html_entity_decode($string, $quote_style, 'UTF-8');
}
}
else
{
/**
* @todo needs documenting
*/
function utf8_html_entity_decode($string, $quote_style = ENT_COMPAT)
{
static $static_table;
if ($static_table === null)
{
$static_table = array_map('utf8_encode', array_flip(get_html_translation_table(HTML_ENTITIES)));
}
$modified_table = $static_table;
if ($quote_style === ENT_QUOTES)
{
$modified_table['''] = "'";
}
if ($quote_style === ENT_NOQUOTES)
{
unset($modified_table['"']);
}
return strtr($string, $modified_table);
}
}
?>