From 467216d4c7762dba65980a794958e42b8d6fdd20 Mon Sep 17 00:00:00 2001 From: allo Date: Sun, 19 Feb 2006 18:54:38 +0000 Subject: [PATCH] bugfix for umlaute and html-specialchars in wikiCode git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1704 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/data/wikiCode.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/de/anomic/data/wikiCode.java b/source/de/anomic/data/wikiCode.java index 41f9a07cc..89ed1ed36 100644 --- a/source/de/anomic/data/wikiCode.java +++ b/source/de/anomic/data/wikiCode.java @@ -121,8 +121,8 @@ public class wikiCode { * @author Marc Nause, replaces code by Alexander Schier */ public static String replaceHTML(String text) { - text = replace(text, characters); text = replace(text, htmlentities); + text = replace(text, characters); return text; } @@ -181,7 +181,6 @@ public class wikiCode { //patterns that will be replaced. To add new codes or patterns, just put them at the end //of the list. Codes or patterns in this list can not be escaped with [= or
     public static String[] characters={
-        "\u0026","&",      //ampersand
         "\u00A1","¡",    //inverted (spanish) exclamation mark
         "\u00A2","¢",     //cent
         "\u00A3","£",    //pound
@@ -330,7 +329,6 @@ public class wikiCode {
             line+="\t\n"+result.substring(2);
             result=line;
         }
-        else result = replaceHTMLonly(result);
         return result;
     }
 
@@ -344,14 +342,15 @@ public class wikiCode {
         int p0, p1;
         boolean defList = false;    //needed for definition lists
 
-        if ((!cellprocessing)&&(!replacedCharacters)){
-            result = replaceCharacters(result);
-            replacedCharacters = true;
-        }
         if ((!replacedHTML)&&(!cellprocessing)&&(!table)){
             result = replaceHTMLonly(result);
             replacedHTML = true;
         }
+        if ((!cellprocessing)&&(!replacedCharacters)){
+            result = replaceCharacters(result);
+            replacedCharacters = true;
+        }
+ 
 
         //check if line contains any escape symbol or tag for preformatted text 
         //or if we are in an esacpe sequence already or if we are in a preformated text