summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php4
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));