From dab5d30a937539fbf349efb2884fd0a25d645b3a Mon Sep 17 00:00:00 2001 From: idfx Date: Tue, 2 Oct 2001 17:19:12 +0000 Subject: [PATCH] producer content now htmlize the comments --- source/mircoders/producer/ProducerContent.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/mircoders/producer/ProducerContent.java b/source/mircoders/producer/ProducerContent.java index 11519f18..2123ce7c 100755 --- a/source/mircoders/producer/ProducerContent.java +++ b/source/mircoders/producer/ProducerContent.java @@ -180,7 +180,18 @@ public class ProducerContent extends Producer { } //end if currentMediaList != null // get the comments for the article - mergeData.put("comments", currentContent.getComments()); + // and html-ize them + SimpleList commentList = currentContent.getComments(); + try{ + if(commentList.isEmpty()==false){ + while(commentList.hasNext()){ + SimpleHash comment = (SimpleHash)commentList.next(); + SimpleScalar commentText = (SimpleScalar)comment.get("description"); + comment.put("description",new SimpleScalar(StringUtil.createHTML(commentText.getAsString(),imageRoot,mailLinkName,extLinkName,intLinkName))); + } + } + } catch(Exception e){} + mergeData.put("comments", commentList); // get the topics of this article mergeData.put("topics",HTMLTemplateProcessor.makeSimpleList(DatabaseContentToTopics.getInstance().getTopics(currentContent))); @@ -205,3 +216,4 @@ public class ProducerContent extends Producer { } } + -- 2.11.0