summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-09-04 18:41:29 -0400
committerEvan Prodromou <evan@prodromou.name>2008-09-04 18:41:29 -0400
commitf72b12c7b811d59ab4348007294b0b619de0a69f (patch)
tree52a5c1d051910281fec81199011503e4145618d0 /lib
parentbe075ed642c1221f12af7269ea92119b83413cbc (diff)
better @ links
darcs-hash:20080904224129-84dde-6844b29ab1818954aacaf6d9ef11371dbb11812a.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index df64e74be..ff22ac644 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -686,7 +686,7 @@ function common_render_content($text, $notice) {
$r = preg_replace('/[\x{0}-\x{8}\x{b}-\x{c}\x{e}-\x{19}]/', '', $r);
$id = $notice->profile_id;
$r = preg_replace('@https?://[^)\]>\s]+@', '<a href="\0" class="extlink">\0</a>', $r);
- $r = preg_replace('/(^|\s+)@([a-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_tag_link('\\2')", $r);
# XXX: machine tags
@@ -703,7 +703,7 @@ function common_tag_link($tag) {
function common_at_link($sender_id, $nickname) {
$sender = Profile::staticGet($sender_id);
- $recipient = common_relative_profile($sender, $nickname);
+ $recipient = common_relative_profile($sender, common_canonical_nickname($nickname));
if ($recipient) {
return '<a href="'.htmlspecialchars($recipient->profileurl).'" class="atlink">'.$nickname.'</a>';
} else {