diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index 737731b88a4..ee6b17ba303 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -71,8 +71,9 @@ class WebsiteBlog(http.Controller): if active_tag_ids: fixed_tag_slug = ",".join(slug(t) for t in request.env['blog.tag'].browse(active_tag_ids).exists()) if fixed_tag_slug != tags: - return request.redirect(request.httprequest.full_path.replace("/tag/%s/" % tags, "/tag/%s/" % fixed_tag_slug, 1), 301) - + new_url = request.httprequest.full_path.replace("/tag/%s" % tags, "/tag/%s" % fixed_tag_slug, 1) + if new_url != request.httprequest.full_path: # check that really replaced and avoid loop + return request.redirect(new_url, 301) domain += [('tag_ids', 'in', active_tag_ids)] if request.env.user.has_group('website.group_website_designer'):