From 51caab6e5e9f27765cb94e5b5cf0cf51f97850cc Mon Sep 17 00:00:00 2001 From: Garret Buell Date: Sun, 31 Aug 2008 22:59:32 -0400 Subject: Elide_Tags Make "#sanfrancisco", "#SanFrancisco", "#san_francisco", "#San.Francisco", and "#SAN-FRANCISCO" all link to http://identi.ca/tag/sanfrancisco but preserve appearance darcs-hash:20080901025932-e3c0d-c0a939eaf7e242d88cbcb0d651c9d53718c60a9d.gz --- lib/util.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/util.php') diff --git a/lib/util.php b/lib/util.php index 469bc986f..153009212 100644 --- a/lib/util.php +++ b/lib/util.php @@ -688,16 +688,16 @@ function common_render_content($text, $notice) { $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('/^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); + $r = preg_replace('/(^|\s+)#([A-Za-z0-9_\-\.]{1,64})/e', "'\\1#'.common_tag_link('\\2')", $r); # XXX: machine tags return $r; } function common_tag_link($tag) { if(common_config('site', 'fancy')) { - return ''; + return ''; } else { - return ''; + return ''; } } -- cgit v1.2.3-54-g00ecf