It is necessary to remove the newline character from the regulars list so that it does not cut. I did not find any symbol table, can anyone know what code it is behind?
preg_replace('/([^\pL\pN\pP\pS\pZ])|([\xC2\xA0])/u', ' ', $string); All function:
function istrip($string) { $old_string = $string; $string = strip_tags($string); $string = preg_replace('/([^\pL\pN\pP\pS\pZ])|([\xC2\xA0])/u', ' ', $string); $string = str_replace(' ',' ', $string); $string = trim($string); if ($string === $old_string) { return $string; } else { return istrip($string); } }