From: Evan Prodromou Date: Wed, 17 Sep 2008 11:22:34 +0000 (-0400) Subject: use common_local_url() in tagging, add canonicalization function X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=00eb929c6ba314abf431d92117bd3cee5a73b2ff;p=quix0rs-gnu-social.git use common_local_url() in tagging, add canonicalization function darcs-hash:20080917112234-84dde-69fb6c2dc279b8fffd5c524673808d8991e99429.gz --- 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) {