From 6f31f25105f59bee5d6a8eccf43952e1396846b3 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 20 Nov 2008 16:48:21 -0500 Subject: let users set their own profile tags from profilesettings darcs-hash:20081120214821-84dde-c8569ef645b389de545f78bf01a270f28b871f02.gz --- lib/util.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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)); -- cgit v1.2.3-54-g00ecf