2003/09/24 07:33:33
[org.ibex.core.git] / src / org / xwt / translators / HTML.java
index b8ece56..bd6f350 100644 (file)
@@ -37,8 +37,9 @@ import org.xwt.util.*;
  */
 public class HTML {
 
-    // FIXME: fill in
-    private final static String[] bodylessTags = new String[] { "br", "hr", "input", "img", "isindex" };
+    private final static String[] noEndTag =
+        new String[] { "area", "base", "basefont", "br", "col", "frame", "hr", "img",
+                       "input", "isindex", "link", "meta", "param" };
 
     /** we keep a char[] around for use by removeRedundantWhitespace() */
     private static char[] cbuf = null;
@@ -87,7 +88,6 @@ public class HTML {
         while(Character.isSpace(cs.peek())) cs.get();
         String elementName = parseElementName(cs);
 
-        // FIXME: this might not deal correctly with EOFExceptions
         boolean saveWithinLI = withinLI;
         if (elementName.equals("li")) {
             if (withinLI) {
@@ -119,8 +119,8 @@ public class HTML {
         cs.get();
 
         // bodyless tags return here
-        for(int i=0; i<bodylessTags.length; i++)
-            if (bodylessTags[i].equals(elementName))
+        for(int i=0; i<noEndTag.length; i++)
+            if (noEndTag[i].equals(elementName))
                 return null;
 
         // scan body
@@ -270,7 +270,7 @@ public class HTML {
                 sb.append("\"");
                 i = nextamp + 6;
             } else if (s.regionMatches(nextamp, "&nbsp;", 0, 6)) {
-                // FIXME: should have a way to indicate this...
+                // FEATURE: perhaps we should distinguish this somehow
                 sb.append(" ");
                 i = nextamp + 6;
             } else {
@@ -281,7 +281,6 @@ public class HTML {
         return sb.toString();
     }
 
-    // FIXME double check this
     /** removes all redundant whitespace */
     private static String removeRedundantWhitespace(String s) {