*) 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
pull/1/head
theli 19 years ago
parent 5a8b06a851
commit bab74b0499

@ -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();

Loading…
Cancel
Save