Author: nextgens
Date: 2007-04-07 15:42:04 +0000 (Sat, 07 Apr 2007)
New Revision: 12548

Modified:
   trunk/freenet/src/freenet/support/HTMLNode.java
Log:
Small fix to HTMLNode: we want Node's name to be lowercase otherwise they won't 
be matched in generate()... and it's usually a good practice anyway.

Modified: trunk/freenet/src/freenet/support/HTMLNode.java
===================================================================
--- trunk/freenet/src/freenet/support/HTMLNode.java     2007-04-07 15:14:47 UTC 
(rev 12547)
+++ trunk/freenet/src/freenet/support/HTMLNode.java     2007-04-07 15:42:04 UTC 
(rev 12548)
@@ -5,6 +5,7 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;

@@ -39,7 +40,7 @@
        }

        public HTMLNode(String name, String[] attributeNames, String[] 
attributeValues, String content) {
-               this.name = name;
+               this.name = name.toLowerCase(Locale.ENGLISH);
                if ((attributeNames != null) && (attributeValues != null)) {
                        if (attributeNames.length != attributeValues.length) {
                                throw new IllegalArgumentException("attribute 
names and values differ");


Reply via email to