Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Fixed a bug: Images in tables were not displayed if alt or align attributes were added. *) Align for images only accepts valid parameters (bottom, top, center, middle, left , right) now.
low012d6cc0ec3d849
diff --git a/source/de/anomic/data/wikiCode.java b/source/de/anomic/data/wikiCode.javaindex 15d28a379..dbbed1696 100644--- a/source/de/anomic/data/wikiCode.java+++ b/source/de/anomic/data/wikiCode.java@@ -311,7 +311,16 @@ public class wikiCode {else if ((result.startsWith("||")) && (table)) {line+="\t\t<td";int cellEnd=(result.indexOf("||",2)>0)?(result.indexOf("||",2)):(result.length());- int propEnd=(result.indexOf("|",2)>0)?(result.indexOf("|",2)):(cellEnd);+ int propEnd = 0;+ //If resultOf("[[Image:") is less than propEnd, that means that there is no+ //property for this cell, only an image. Without this, YaCy could get confused+ //by a | in [[Image:picture.png|alt-text]] or [[Image:picture.png|alt-text]]+ if(((propEnd = result.indexOf("|",2)) > 0)&&(!(result.indexOf("[[Image:",2) < propEnd))){+ propEnd = result.indexOf("|",2);+ }+ else {+ propEnd = cellEnd;+ }// both point at same place => new lineif (propEnd==cellEnd) {propEnd=1;@@ -747,7 +756,19 @@ public class wikiCode {// if there are 2 arguments, write them into ALIGN and ALTif ((p = kv.indexOf("|")) > 0) {- align = " align=\"" + kv.substring(0, p) + "\"";+ align = kv.substring(0, p);+ //checking validity of value for align. Only non browser specific+ //values get supported. Not supported: absmiddle, baseline, texttop+ if ((align.equals("bottom"))||+ (align.equals("center"))||+ (align.equals("left"))||+ (align.equals("middle"))||+ (align.equals("right"))||+ (align.equals("top")))+ {+ align = " align=\"" + align + "\"";+ }+ else align = "";alt = " alt=\"" + kv.substring(p + 1) + "\"";}