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 '' . htmlspecialchars($tag) . '';
- } else {
- return '' . htmlspecialchars($tag) . '';
- }
+ $canonical = common_canonical_tag($tag);
+ $url = common_local_url('tag', array('tag' => $canonical));
+ return '' . htmlspecialchars($tag) . '';
+}
+
+function common_canonical_tag($tag) {
+ return strtolower(str_replace(array('-', '_', '.'), '', $tag));
}
function common_at_link($sender_id, $nickname) {