사용자 코드 체크 및 정리

This commit is contained in:
chicpro
2014-03-26 17:14:30 +09:00
parent e61c402067
commit 1c9f0f6018
19 changed files with 65 additions and 51 deletions

View File

@ -7,9 +7,14 @@ function specialchars_replace($str, $len=0) {
$str = substr($str, 0, $len);
}
$str = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $str);
/*
$str = preg_replace("/&/", "&amp;", $str);
$str = preg_replace("/</", "&lt;", $str);
$str = preg_replace("/>/", "&gt;", $str);
*/
return $str;
}