diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-11-20 16:48:21 -0500 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-11-20 16:48:21 -0500 |
commit | 6f31f25105f59bee5d6a8eccf43952e1396846b3 (patch) | |
tree | ca3fe49756d05e81b5b2fed39bd3f0953fbb3fb8 /lib | |
parent | 8a0c438aedebaa0282e4f23c83dbe0d7d2635f33 (diff) |
let users set their own profile tags from profilesettings
darcs-hash:20081120214821-84dde-c8569ef645b389de545f78bf01a270f28b871f02.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index efce283a9..13fcfcc70 100644 --- a/lib/util.php +++ b/lib/util.php @@ -844,6 +844,10 @@ function common_canonical_tag($tag) { return strtolower(str_replace(array('-', '_', '.'), '', $tag)); } +function common_valid_profile_tag($str) { + return preg_match('/^[A-Za-z0-9_\-\.]{1,64}$/', $str); +} + function common_at_link($sender_id, $nickname) { $sender = Profile::staticGet($sender_id); $recipient = common_relative_profile($sender, common_canonical_nickname($nickname)); |