diff --git a/upload/source/class/class_tag.php b/upload/source/class/class_tag.php index 508175c8a234be5e74995da678b918c8493d812d..651a5a335e1723edb893de5827d53059539a93d9 100644 --- a/upload/source/class/class_tag.php +++ b/upload/source/class/class_tag.php @@ -28,7 +28,7 @@ class tag $tagcount = 0; foreach($tagarray as $tagname) { $tagname = trim($tagname); - if(preg_match('/^([\x7f-\xff_-]|\w|\s){3,20}$/', $tagname)) { + if(preg_match('/^([\x7f-\xff_-]|\w|\s){2,20}$/', $tagname)) { $status = $idtype != 'uid' ? 0 : 3; $result = C::t('common_tag')->get_bytagname($tagname, $idtype); if($result['tagid']) { @@ -116,7 +116,7 @@ class tag if(!$newtag) { return 'tag_empty'; } - if(preg_match('/^([\x7f-\xff_-]|\w|\s){3,20}$/', $newtag)) { + if(preg_match('/^([\x7f-\xff_-]|\w|\s){2,20}$/', $newtag)) { $tidarray = $blogidarray = array(); $newtaginfo = $this->add_tag($newtag, 0, $idtype, 1); foreach($newtaginfo as $tagid => $tagname) {