svn 5580 placed a bug into yacyinteractive and it was not possible

to search any more. The cause was the replacement of '&' with '&amp'
in the call of the json source.
Please TEST _every_ code change.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5585 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent e9a4182e6a
commit c6c57b7b3d

@ -3,10 +3,9 @@
<head> <head>
<title>YaCy Interactive Search</title> <title>YaCy Interactive Search</title>
#%env/templates/metas.template%# #%env/templates/metas.template%#
<script type="text/javascript"> <script language="Javascript">
//<![CDATA[ //<![CDATA[
function xmlhttpPost() { function xmlhttpPost() {
var searchform = document.forms['searchform']; var searchform = document.forms['searchform'];
search(searchform.query.value); search(searchform.query.value);
} }
@ -20,7 +19,7 @@ function search(query) {
else if (window.ActiveXObject) { // IE else if (window.ActiveXObject) { // IE
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
} }
self.xmlHttpReq.open('GET', "yacysearch.json?verify=false&amp;resource=local&amp;maximumRecords=100&amp;query=" + query, true); self.xmlHttpReq.open('GET', "yacysearch.json?verify=false&resource=local&maximumRecords=100&query=" + query, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() { self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) { if (self.xmlHttpReq.readyState == 4) {
@ -80,7 +79,7 @@ if (q != "") search(q);
#(display)# #(display)#
#%env/templates/simpleheader.template%# #%env/templates/simpleheader.template%#
:: ::
<div id="api"><a href="yacysearch.json?query=yacy"><img src="env/grafics/api.png" alt="API" /></a> <div id="api"><a href="yacysearch.json?query=yacy"><img src="env/grafics/api.png" alt="API"/></a>
<span>This page uses the JSON search API to display search results as you type. <span>This page uses the JSON search API to display search results as you type.
Click the API icon to see an example call to the native API. Click the API icon to see an example call to the native API.
To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de/wiki/index.php/Dev:API">API wiki page</a>.</span> To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de/wiki/index.php/Dev:API">API wiki page</a>.</span>
@ -90,10 +89,10 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
#%env/templates/embeddedheader.template%# #%env/templates/embeddedheader.template%#
#(/display)# #(/display)#
<form class="search small" id="searchform" action="get" onkeyup="xmlhttpPost(); return false;"> <form class="search small" name="searchform" action="yacyinteractive.html" method="get" onkeyup="xmlhttpPost(); return false;">
<h2>#[promoteSearchPageGreeting]#</h2> <h2>#[promoteSearchPageGreeting]#</h2>
<div class="yacylogo"> <div class="yacylogo">
<a href="#[promoteSearchPageGreeting.homepage]#" class="yacylogo"><img src="#[promoteSearchPageGreeting.smallImage]#" alt="yacysearch" /></a> <a href="#[promoteSearchPageGreeting.homepage]#" class="yacylogo"><img src="#[promoteSearchPageGreeting.smallImage]#" alt="yacysearch"/></a>
</div> </div>
<fieldset class="yacys"><input name="query" type="text" value="#[query]#" size="50" maxlength="80" /></fieldset> <fieldset class="yacys"><input name="query" type="text" value="#[query]#" size="50" maxlength="80" /></fieldset>

Loading…
Cancel
Save