]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
Fix a UI typo which appear when using $config['site']['indent'] = null
[quix0rs-gnu-social.git] / lib / util.php
index e5b0c86e06160599436901a3f84c4a8717d2932e..629d8326fd2e0669c629587e7b3931d20ce0a4bd 100644 (file)
@@ -1096,8 +1096,11 @@ function common_tag_link($tag)
 
 function common_canonical_tag($tag)
 {
+  // only alphanum
+  $tag = preg_replace('/[^\pL\pN]/u', '', $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)