producer content now htmlize the comments
authoridfx <idfx>
Tue, 2 Oct 2001 17:19:12 +0000 (17:19 +0000)
committeridfx <idfx>
Tue, 2 Oct 2001 17:19:12 +0000 (17:19 +0000)
source/mircoders/producer/ProducerContent.java

index 11519f1..2123ce7 100755 (executable)
@@ -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 {
   }
 
 }
+