fixing html whitelist bug
[mir.git] / source / mircoders / producer / PDFPreFormattingProducerNode.java
index 50e69bf..597872e 100755 (executable)
@@ -34,8 +34,8 @@ import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
-import java.util.Vector;
 
 import mir.entity.Entity;
 import mir.entity.EntityBrowser;
@@ -105,14 +105,14 @@ public class PDFPreFormattingProducerNode implements ProducerNode {
       ArrayList brokenUpContent = new ArrayList();
 
 
-      Vector extraTables = new Vector();
+      List extraTables = new ArrayList();
       extraTables.add("content_x_media cxm");
       Iterator images = new EntityBrowser(
         DatabaseImages.getInstance(), "i", extraTables,
           "cxm.content_id="+entity.getId()+"and cxm.media_id=i.id",
           "i.id desc", 30, -1, 0);
 
-      String theContent = ((EntityContent) entity).getValue("content_data");
+      String theContent = ((EntityContent) entity).getFieldValue("content_data");
       //remove pesky characters
       theContent = HTMLRoutines.encodeXML(theContent);
       //put in the <BR> tags so we can turn them to empty blocks
@@ -144,8 +144,8 @@ public class PDFPreFormattingProducerNode implements ProducerNode {
               Map row1 = new HashMap();
               Map row2 = new HashMap();
               EntityImages currentImage=(EntityImages) images.next();
-              float img_width=(new Float(currentImage.getValue("img_width"))).floatValue();
-              float img_height=(new Float(currentImage.getValue("img_height"))).floatValue();
+              float img_width=(new Float(currentImage.getFieldValue("img_width"))).floatValue();
+              float img_height=(new Float(currentImage.getFieldValue("img_height"))).floatValue();
 
               //oversize images must be shrunk
               if (img_width>250){
@@ -162,7 +162,7 @@ public class PDFPreFormattingProducerNode implements ProducerNode {
 
               row1.put("text_widthCM",Float.toString(text_widthCM));
 
-              row1.put("img_title",currentImage.getValue("title"));
+              row1.put("img_title",currentImage.getFieldValue("title"));
 
               row1.put("img_width",Float.toString(img_width));
               row1.put("img_height",Float.toString(img_height));
@@ -170,7 +170,7 @@ public class PDFPreFormattingProducerNode implements ProducerNode {
               aLogger.debug("img_width " +Float.toString(img_width));
               aLogger.debug("img_height "+Float.toString(img_height));
 
-              row1.put("img_src",currentImage.getValue("publish_path"));
+              row1.put("img_src",currentImage.getFieldValue("publish_path"));
               row1.put("hasImage","1");
               if (! outOfText){
                   try {