form 입력값에서 space를 포함한 값이 넘어오는 경우가 있어 space 는 제외하고 replace 함

This commit is contained in:
kagla
2022-04-28 17:14:59 +09:00
parent 5981fd11bf
commit 7e3ad29696

View File

@ -3077,7 +3077,9 @@ function get_search_string($stx)
function clean_xss_tags($str, $check_entities=0, $is_remove_tags=0, $cur_str_len=0)
{
// space, tab('\t'), formfeed('\f'), vertical tab('\v'), newline('\n'), carriage return('\r') 를 제거한다.
$str = preg_replace('#[[:space:]]#', '', $str);
// $str = preg_replace('#[[:space:]]#', '', $str);
// tab('\t'), formfeed('\f'), vertical tab('\v'), newline('\n'), carriage return('\r') 를 제거한다.
$str = preg_replace('#[\t\f\v\n\r]#', '', $str);
if( $is_remove_tags ){
$str = strip_tags($str);