X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=war%2Fsrc%2Fmain%2Fjava%2Fpnews%2Fservlet%2FHTML.java;h=321c5a7822f560548583ba79c3a3255ab2441174;hb=892111b2ecf385bd28bbe93ff6113cbc1e04409e;hp=7b7b1424a692a5dc3ee491419fdf99f85aa87eb3;hpb=0915e687fb41a3543d03b30a3dbe3b3c49103fa3;p=pnews.git diff --git a/war/src/main/java/pnews/servlet/HTML.java b/war/src/main/java/pnews/servlet/HTML.java index 7b7b142..321c5a7 100644 --- a/war/src/main/java/pnews/servlet/HTML.java +++ b/war/src/main/java/pnews/servlet/HTML.java @@ -53,7 +53,7 @@ public class HTML { buf.append("
\n"); buf.append("
\n"); - appendA(buf, a.title, "redirect?url=" + URLEncoder.encode(a.link, "UTF-8"), null); + appendA(buf, a.title, "/redirect?url=" + URLEncoder.encode(a.link, "UTF-8"), null); buf.append("
\n"); buf.append("
" + a.website + " - " + a.publicationDate + "
"); @@ -71,13 +71,13 @@ public class HTML { buf.append("
\n"); } - private static void appendMenu(StringBuffer buf, Category catActive) { + private static void appendMenu(StringBuffer buf, Category catActive, Category[] cats) { String cl; buf.append("\n"); } - public static String toHTML(List
articles, Category catActive) { + public static String toHTML(List
articles, Category catActive, Category[] cats) { StringBuffer buf; int i; @@ -102,21 +104,21 @@ public class HTML { buf.append("\n"); buf.append("\n"); buf.append("\n"); - buf.append("\n"); + buf.append("\n"); buf.append(""); buf.append(catActive.getTitle()); buf.append(" - PNews\n"); buf.append("\n"); buf.append("\n"); - appendMenu(buf, catActive); + appendMenu(buf, catActive, cats); i = 0; for (Article e: articles) { try { append(buf, e); } catch (UnsupportedEncodingException e1) { - LOG.log(Level.SEVERE, "fail to convert article to HTML", e1); + LOG.log(Level.SEVERE, "Failed to convert article to HTML", e1); } if (i == 100) break;