"); - buf.append(a.description); + if (a.getDescription().length() < 512) { + buf.append(a.getDescription()); + } else { + buf.append(a.getDescription().substring(0, 512)); + buf.append("[..]"); + } buf.append("
"); } buf.append("X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=war%2Fsrc%2Fmain%2Fjava%2Fpnews%2Fservlet%2FHTML.java;h=ac7a749b3db7e4499ba22c798d1c90427edc79e2;hb=aff83c8798602b535d13edeaffdb8f4238e2bbf5;hp=89ce7c5970122ab643f240ad601f890437929931;hpb=56c07f5de3319eb61182b7100855801644538e6f;p=pnews.git diff --git a/war/src/main/java/pnews/servlet/HTML.java b/war/src/main/java/pnews/servlet/HTML.java index 89ce7c5..ac7a749 100644 --- a/war/src/main/java/pnews/servlet/HTML.java +++ b/war/src/main/java/pnews/servlet/HTML.java @@ -9,10 +9,11 @@ import java.util.logging.Logger; import com.rometools.rome.io.FeedException; -import pnews.Article; -import pnews.Category; -import pnews.EntityStat; -import pnews.Language; +import net.wpitchoune.pnews.Article; +import net.wpitchoune.pnews.Category; +import net.wpitchoune.pnews.Config; +import net.wpitchoune.pnews.EntityStat; +import net.wpitchoune.pnews.Language; public class HTML { private static final String CLASS_NAME= HTML.class.getName(); @@ -48,9 +49,9 @@ public class HTML { buf.append("
"); - buf.append(a.description); + if (a.getDescription().length() < 512) { + buf.append(a.getDescription()); + } else { + buf.append(a.getDescription().substring(0, 512)); + buf.append("[..]"); + } buf.append("
"); } buf.append("