diff --git a/include/text.php b/include/text.php index a47e352ba..7b4d7e191 100644 --- a/include/text.php +++ b/include/text.php @@ -218,14 +218,16 @@ function xmlify($str) { break; } }*/ - + /* $buffer = mb_ereg_replace("&", "&", $str); $buffer = mb_ereg_replace("'", "'", $buffer); - $buffer = mb_ereg_replace("\"", """, $buffer); + $buffer = mb_ereg_replace('"', """, $buffer); $buffer = mb_ereg_replace("<", "<", $buffer); $buffer = mb_ereg_replace(">", ">", $buffer); - + */ + $buffer = htmlspecialchars($str); $buffer = trim($buffer); + return($buffer); }} @@ -238,11 +240,13 @@ if(! function_exists('unxmlify')) { function unxmlify($s) { // $ret = str_replace('&','&', $s); // $ret = str_replace(array('<','>','"','''),array('<','>','"',"'"),$ret); - $ret = mb_ereg_replace('&', '&', $s); + /*$ret = mb_ereg_replace('&', '&', $s); $ret = mb_ereg_replace(''', "'", $ret); $ret = mb_ereg_replace('"', '"', $ret); $ret = mb_ereg_replace('<', "<", $ret); $ret = mb_ereg_replace('>', ">", $ret); + */ + $ret = htmlspecialchars_decode($s); return $ret; }}