Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) better handling of urls containing query parameters

theli3feeba3d7be3
diff --git a/htroot/QuickCrawlLink_p.html b/htroot/QuickCrawlLink_p.html
index da1c8be4b..473877cba 100644
--- a/htroot/QuickCrawlLink_p.html
+++ b/htroot/QuickCrawlLink_p.html
@@ -35,7 +35,7 @@ If you click on it while browsing, the currently viewed website will be inserted
</td>
</tr>
<tr>
- <td><a href="javascript:w = window.open('http://#[host]#:#[port]#/QuickCrawlLink_p.html?localIndexing=on&amp;crawlingQ=on&amp;xdstopw=on&amp;title='+escape(document.title)+'&amp;url='+location.href,'_blank','height=150,width=500,resizable=yes,scrollbar=no,directory=no,menubar=no,location=no');w.focus();"><img src="/env/grafics/addlink.gif" border="0">&nbsp;Crawl with YaCy</a></td>
+ <td><a href="javascript:w = window.open('http://#[host]#:#[port]#/QuickCrawlLink_p.html?localIndexing=on&amp;crawlingQ=on&amp;xdstopw=on&amp;title='+escape(document.title)+'&amp;url='+escape(location.href),'_blank','height=150,width=500,resizable=yes,scrollbar=no,directory=no,menubar=no,location=no');w.focus();"><img src="/env/grafics/addlink.gif" border="0">&nbsp;Crawl with YaCy</a></td>
</tr>
</table>
diff --git a/htroot/QuickCrawlLink_p.java b/htroot/QuickCrawlLink_p.java
index c4952d4a8..1d4ff307a 100644
--- a/htroot/QuickCrawlLink_p.java
+++ b/htroot/QuickCrawlLink_p.java
@@ -48,8 +48,10 @@
//if the shell's current path is HTROOT
+import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.net.URLDecoder;
import java.util.Date;
import de.anomic.htmlFilter.htmlFilterContentScraper;
@@ -99,6 +101,12 @@ public class QuickCrawlLink_p {
// getting the URL
String crawlingStart = post.get("url",null);
+ try {
+ crawlingStart = URLDecoder.decode(crawlingStart, "UTF-8");
+ } catch (UnsupportedEncodingException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
// getting the browser title
String title = post.get("title",null);