tag_is_valid: add length checking

This commit is contained in:
Andrew Dolgov 2009-06-01 11:29:13 +04:00
parent 5e63d54724
commit 41f7498af3
1 changed files with 1 additions and 0 deletions

View File

@ -4442,6 +4442,7 @@
function tag_is_valid($tag) {
if ($tag == '') return false;
if (preg_match("/^[0-9]*$/", $tag)) return false;
if (mb_strlen($tag) > 250) return false;
if (function_exists('iconv')) {
$tag = iconv("utf-8", "utf-8", $tag);