// Clean post vars
function clean_var ($vars) {
if (!is_array($vars)) {
return preg_replace("/[^\w\r@ :{}öäåÖÄÅ_.-]/i", "", urldecode($vars));
} else {
return array_map('clean_var', $vars);
}
}
By removing the \p{L} and \p{M} and adding öäåÅÖÄ it now seems to be working. The L seems to be any unicode letter, right?
But I have no idea what the M, Mark, stands for. The problem with unicode specs is that it's sooo confusing, there is just
too much to read.
Is there any reason why doing the above is stupid or is this fine? It does seem to work at least in contact us and reviews.