diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/general.lib.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php index deb8e176..c975ed22 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -1019,5 +1019,18 @@ function get_plugins() { } // get_plugins +/** + * unhtmlentities + * This is required to make thing work.. but holycrap is it ugly + */ +function unhtmlentities ($string) { + + $trans_tbl = get_html_translation_table (HTML_ENTITIES); + $trans_tbl = array_flip ($trans_tbl); + $ret = strtr ($string, $trans_tbl); + return preg_replace('/&#(\d+);/me', "chr('\\1')",$ret); + +} // unhtmlentities + ?> |