forked from GNUsocial/gnu-social
cleanse tags of non-tag characters when canonicalizing
This commit is contained in:
parent
e0238e7c17
commit
10ce44c297
@ -1096,8 +1096,11 @@ function common_tag_link($tag)
|
||||
|
||||
function common_canonical_tag($tag)
|
||||
{
|
||||
// only alphanum
|
||||
$tag = preg_replace('/[^\pL\pN]/', '', $tag);
|
||||
$tag = mb_convert_case($tag, MB_CASE_LOWER, "UTF-8");
|
||||
return str_replace(array('-', '_', '.'), '', $tag);
|
||||
$tag = substr($tag, 0, 64);
|
||||
return $tag;
|
||||
}
|
||||
|
||||
function common_valid_profile_tag($str)
|
||||
|
Loading…
Reference in New Issue
Block a user