From: idfx Date: Tue, 2 Oct 2001 17:19:12 +0000 (+0000) Subject: producer content now htmlize the comments X-Git-Tag: prexmlproducerconfig~376 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=dab5d30a937539fbf349efb2884fd0a25d645b3a;p=mir.git producer content now htmlize the comments --- 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 { } } +