diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-09-22 19:34:10 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-09-22 19:34:10 -0400 |
commit | 2cabfba767ba0d92d34a6ea4e4cf91c7325f3e95 (patch) | |
tree | 94ed88ce5413002bb124a7e5d38329d1f464b48c /lib | |
parent | f3c8fcccc1c90b6741a15963f3c6429a906bc97c (diff) |
Allow some punctuation instead of just spaces before @user, !group, and #tag
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php index bd15a5622..441dcf68e 100644 --- a/lib/util.php +++ b/lib/util.php @@ -391,10 +391,10 @@ function common_render_content($text, $notice) { $r = common_render_text($text); $id = $notice->profile_id; - $r = preg_replace('/(^|\s+)@([A-Za-z0-9]{1,64})/e', "'\\1@'.common_at_link($id, '\\2')", $r); + $r = preg_replace('/(^|[\s\.\,\:\;]+)@([A-Za-z0-9]{1,64})/e', "'\\1@'.common_at_link($id, '\\2')", $r); $r = preg_replace('/^T ([A-Z0-9]{1,64}) /e', "'T '.common_at_link($id, '\\1').' '", $r); - $r = preg_replace('/(^|\s+)@#([A-Za-z0-9]{1,64})/e', "'\\1@#'.common_at_hash_link($id, '\\2')", $r); - $r = preg_replace('/(^|\s)!([A-Za-z0-9]{1,64})/e', "'\\1!'.common_group_link($id, '\\2')", $r); + $r = preg_replace('/(^|[\s\.\,\:\;]+)@#([A-Za-z0-9]{1,64})/e', "'\\1@#'.common_at_hash_link($id, '\\2')", $r); + $r = preg_replace('/(^|[\s\.\,\:\;]+)!([A-Za-z0-9]{1,64})/e', "'\\1!'.common_group_link($id, '\\2')", $r); return $r; } |