From 00eb929c6ba314abf431d92117bd3cee5a73b2ff Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 17 Sep 2008 07:22:34 -0400 Subject: [PATCH] use common_local_url() in tagging, add canonicalization function darcs-hash:20080917112234-84dde-69fb6c2dc279b8fffd5c524673808d8991e99429.gz --- lib/util.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/util.php b/lib/util.php index 0b71cfe4f5..51dcbe9394 100644 --- a/lib/util.php +++ b/lib/util.php @@ -699,11 +699,13 @@ function common_render_content($text, $notice) { } function common_tag_link($tag) { - if(common_config('site', 'fancy')) { - return ''; - } else { - return ''; - } + $canonical = common_canonical_tag($tag); + $url = common_local_url('tag', array('tag' => $canonical)); + return ''; +} + +function common_canonical_tag($tag) { + return strtolower(str_replace(array('-', '_', '.'), '', $tag)); } function common_at_link($sender_id, $nickname) { -- 2.39.5