*) escaping special chars in the url properly

- was a problem for QuickCrawlLink_p.xml

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1607 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
theli 2006-02-11 13:30:36 +00:00
parent 5a8b06a851
commit bab74b0499

View File

@ -121,9 +121,19 @@ public class QuickCrawlLink_p {
boolean xsstopw = post.get("xsstopw", "").equals("on");
boolean xdstopw = post.get("xdstopw", "").equals("on");
boolean xpstopw = post.get("xpstopw", "").equals("on");
String escapedTitle = (title==null)?"unknown":title.replaceAll("&","&")
.replaceAll("<", "&lt;")
.replaceAll(">", "&gt;")
.replaceAll("\"", "&quot;");
prop.put("mode_url",(crawlingStart==null)?"unknown":crawlingStart);
prop.put("mode_title",(title==null)?"unknown":title);
String escapedURL = (crawlingStart==null)?"unknown":crawlingStart.replaceAll("&","&amp;")
.replaceAll("<", "&lt;")
.replaceAll(">", "&gt;")
.replaceAll("\"", "&quot;");
prop.put("mode_url",escapedURL);
prop.put("mode_title",escapedTitle);
if (crawlingStart != null) {
crawlingStart = crawlingStart.trim();