Author: nextgens
Date: 2007-04-11 13:30:58 +0000 (Wed, 11 Apr 2007)
New Revision: 12575

Modified:
   trunk/freenet/src/freenet/support/HTMLDecoder.java
Log:
HTMLDecoder: As toad has pointed out we are already decoding &#xxxx; no need to 
add them explicitely in the hashmap

Modified: trunk/freenet/src/freenet/support/HTMLDecoder.java
===================================================================
--- trunk/freenet/src/freenet/support/HTMLDecoder.java  2007-04-11 13:25:01 UTC 
(rev 12574)
+++ trunk/freenet/src/freenet/support/HTMLDecoder.java  2007-04-11 13:30:58 UTC 
(rev 12575)
@@ -29,7 +29,7 @@
                                tmpPos = curPos;
                                if (tmpPos < maxPos) {
                                        char d = s.charAt(tmpPos++);
-                                       if (d == '#') {
+                                       if (d == '#') { // REDFLAG: FIXME: We 
might want to prevent control characters from beeing created here...
                                                if (tmpPos < maxPos) {
                                                        d = s.charAt(tmpPos++);
                                                        if ((d == 'x') || (d == 
'X')) {
@@ -258,27 +258,10 @@
                charTable.put("yacute", new Character((char)253));
                charTable.put("thorn", new Character((char)254));
                charTable.put("yuml", new Character((char)255));
-               charTable.put("#260", new Character((char)260));
-               charTable.put("#261", new Character((char)261));
-               charTable.put("#262", new Character((char)262));
-               charTable.put("#263", new Character((char)263));
-               charTable.put("#280", new Character((char)280));
-               charTable.put("#281", new Character((char)281));
-               charTable.put("#321", new Character((char)321));
-               charTable.put("#322", new Character((char)322));
-               charTable.put("#323", new Character((char)323));
-               charTable.put("#324", new Character((char)324));
                charTable.put("OElig", new Character((char)338));
                charTable.put("oelig", new Character((char)339));
-               charTable.put("#346", new Character((char)346));
-               charTable.put("#347", new Character((char)347));
                charTable.put("Scaron", new Character((char)352));
                charTable.put("scaron", new Character((char)353));
-               charTable.put("#376", new Character((char)376));
-               charTable.put("#377", new Character((char)377));
-               charTable.put("#378", new Character((char)378));
-               charTable.put("#379", new Character((char)379));
-               charTable.put("#480", new Character((char)380));
                charTable.put("fnof", new Character((char)402));
                charTable.put("circ", new Character((char)710));
                charTable.put("tilde", new Character((char)732));


Reply via email to