Added support for backets in tag names
This commit is contained in:
parent
4648b6afca
commit
2a625db683
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ class Model_Tag extends AbstractModel
|
||||||
if (strlen($tag) > $maxLength)
|
if (strlen($tag) > $maxLength)
|
||||||
throw new SimpleException('Tag must have at most ' . $maxLength . ' characters');
|
throw new SimpleException('Tag must have at most ' . $maxLength . ' characters');
|
||||||
|
|
||||||
if (!preg_match('/^[a-zA-Z0-9_.-]+$/i', $tag))
|
if (!preg_match('/^[()\[\]a-zA-Z0-9_.-]+$/i', $tag))
|
||||||
throw new SimpleException('Invalid tag "' . $tag . '"');
|
throw new SimpleException('Invalid tag "' . $tag . '"');
|
||||||
|
|
||||||
if (preg_match('/^\.\.?$/', $tag))
|
if (preg_match('/^\.\.?$/', $tag))
|
||||||
|
|
Loading…
Reference in a new issue