diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/tag.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/tag.php b/actions/tag.php index 039cd9660..803026e62 100644 --- a/actions/tag.php +++ b/actions/tag.php @@ -24,13 +24,18 @@ class TagAction extends Action function prepare($args) { parent::prepare($args); - $this->tag = $this->trimmed('tag'); + $taginput = $this->trimmed('tag'); + $this->tag = common_canonical_tag($taginput); if (!$this->tag) { common_redirect(common_local_url('publictagcloud'), 301); return false; } + if ($this->tag != $taginput) { + common_redirect(common_local_url('tag', array('tag' => $this->tag))); + } + $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; return true; } |