correctly include UTF-8 alphanum chars in tags

This commit is contained in:
Evan Prodromou 2011-08-02 14:03:12 -04:00
parent 897e3c87e5
commit edb3f704b9

View File

@ -1097,7 +1097,7 @@ function common_tag_link($tag)
function common_canonical_tag($tag)
{
// only alphanum
$tag = preg_replace('/[^\pL\pN]/', '', $tag);
$tag = preg_replace('/[^\pL\pN]/u', '', $tag);
$tag = mb_convert_case($tag, MB_CASE_LOWER, "UTF-8");
$tag = substr($tag, 0, 64);
return $tag;