From: Evan Prodromou Date: Thu, 4 Sep 2008 22:41:29 +0000 (-0400) Subject: better @ links X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f72b12c7b811d59ab4348007294b0b619de0a69f;p=quix0rs-gnu-social.git better @ links darcs-hash:20080904224129-84dde-6844b29ab1818954aacaf6d9ef11371dbb11812a.gz --- diff --git a/lib/util.php b/lib/util.php index df64e74be8..ff22ac644d 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]+@', '\0', $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 ''.$nickname.''; } else {