From e95f13c44bef12e9f95505c6d066dfa7d48edef8 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sun, 20 Apr 2014 14:00:28 +0700 Subject: Tags name case redirect; -canonical link --- src/java/com/juick/http/www/Discover.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/java') diff --git a/src/java/com/juick/http/www/Discover.java b/src/java/com/juick/http/www/Discover.java index fec0c117..08930e27 100644 --- a/src/java/com/juick/http/www/Discover.java +++ b/src/java/com/juick/http/www/Discover.java @@ -44,7 +44,7 @@ public class Discover { Errors.doGet404(sql, request, response); return; } else if (!paramTag.Name.equals(paramTagStr)) { - String url = "/tag/" + paramTag.Name; + String url = "/tag/" + URLEncoder.encode(paramTag.Name, "UTF-8"); if (request.getQueryString() != null) { url += "?" + request.getQueryString(); } @@ -69,11 +69,7 @@ public class Discover { response.setContentType("text/html; charset=UTF-8"); PrintWriter out = response.getWriter(); try { - String canonical = null; - if (!paramTag.Name.equals(paramTagStr) && paramBefore == 0) { - canonical = ""; - } - PageTemplates.pageHead(out, title, canonical); + PageTemplates.pageHead(out, title, null); if (!Utils.isMobileRequest(request)) { PageTemplates.pageNavigation(out, visitor, null); -- cgit v1.2.3