mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
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
This commit is contained in:
parent
4b0dae8fcf
commit
467216d4c7
|
@ -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 <pre>
|
||||
public static String[] characters={
|
||||
"\u0026","&", //ampersand
|
||||
"\u00A1","¡", //inverted (spanish) exclamation mark
|
||||
"\u00A2","¢", //cent
|
||||
"\u00A3","£", //pound
|
||||
|
@ -330,7 +329,6 @@ public class wikiCode {
|
|||
line+="\t</tr>\n</table>"+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
|
||||
|
|
Loading…
Reference in New Issue
Block a user