diff options
author | Ugnich Anton | 2014-04-20 14:00:28 +0700 |
---|---|---|
committer | Ugnich Anton | 2014-04-20 14:00:28 +0700 |
commit | e95f13c44bef12e9f95505c6d066dfa7d48edef8 (patch) | |
tree | fa8cf7d02937cc0c49127395309f995c2ed28ca7 /src/java/com/juick | |
parent | 7e09c7c6b5ad1a3000b7e3ddceca5da2b654df6d (diff) |
Tags name case redirect; -canonical link
Diffstat (limited to 'src/java/com/juick')
-rw-r--r-- | src/java/com/juick/http/www/Discover.java | 8 |
1 files changed, 2 insertions, 6 deletions
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 = "<link rel=\"canonical\" href=\"http://juick.com/tag/" + URLEncoder.encode(paramTag.Name, "UTF-8") + "\"/>"; - } - PageTemplates.pageHead(out, title, canonical); + PageTemplates.pageHead(out, title, null); if (!Utils.isMobileRequest(request)) { PageTemplates.pageNavigation(out, visitor, null); |