From 89d7c6e45ea891c137e215c899ba421c3ecc1a4a Mon Sep 17 00:00:00 2001 From: low012 Date: Mon, 5 Sep 2005 09:53:00 +0000 Subject: [PATCH] *) Bugfix: offset of 1 prevented correct replacement of HTML git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@654 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/data/wikiCode.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/de/anomic/data/wikiCode.java b/source/de/anomic/data/wikiCode.java index fb7dc0b89..ef4086259 100644 --- a/source/de/anomic/data/wikiCode.java +++ b/source/de/anomic/data/wikiCode.java @@ -106,12 +106,12 @@ public class wikiCode { boolean defList = false; //needed for definition lists // avoide html inside - //p0 = 0; while ((p0 = result.indexOf("&", p0+1)) >= 0) result = result.substring(0, p0) + "&" + result.substring(p0 + 1); - p0 = 0; while ((p0 = result.indexOf('"', p0+1)) >= 0) result = result.substring(0, p0) + """ + result.substring(p0 + 1); - p0 = 0; while ((p0 = result.indexOf("<", p0+1)) >= 0) result = result.substring(0, p0) + "<" + result.substring(p0 + 1); - p0 = 0; while ((p0 = result.indexOf(">", p0+1)) >= 0) result = result.substring(0, p0) + ">" + result.substring(p0 + 1); - //p0 = 0; while ((p0 = result.indexOf("*", p0+1)) >= 0) result = result.substring(0, p0) + "•" + result.substring(p0 + 1); - p0 = 0; while ((p0 = result.indexOf("(C)", p0+1)) >= 0) result = result.substring(0, p0) + "©" + result.substring(p0 + 3); + //p0 = 0; while ((p0 = result.indexOf("&", p0)) >= 0) result = result.substring(0, p0) + "&" + result.substring(p0 + 1); + p0 = 0; while ((p0 = result.indexOf('"', p0)) >= 0) result = result.substring(0, p0) + """ + result.substring(p0 + 1); + p0 = 0; while ((p0 = result.indexOf("<", p0)) >= 0) result = result.substring(0, p0) + "<" + result.substring(p0 + 1); + p0 = 0; while ((p0 = result.indexOf(">", p0)) >= 0) result = result.substring(0, p0) + ">" + result.substring(p0 + 1); + //p0 = 0; while ((p0 = result.indexOf("*", p0)) >= 0) result = result.substring(0, p0) + "•" + result.substring(p0 + 1); + p0 = 0; while ((p0 = result.indexOf("(C)", p0)) >= 0) result = result.substring(0, p0) + "©" + result.substring(p0 + 3); //check if line contains any escape symbol of if we are in an esacpe sequence already