|
|
|
@ -137,7 +137,8 @@ public class yacysearch {
|
|
|
|
|
}
|
|
|
|
|
final boolean focus = (post == null) ? true : post.get("focus", "1").equals("1");
|
|
|
|
|
// get query
|
|
|
|
|
final String originalquerystring = (post == null) ? "" : post.get("query", post.get("search", "")).trim();
|
|
|
|
|
String originalquerystring = (post == null) ? "" : post.get("query", post.get("search", "")).trim();
|
|
|
|
|
originalquerystring = originalquerystring.replace('<', ' ').replace('>', ' '); // light xss protection
|
|
|
|
|
String querystring = originalquerystring;
|
|
|
|
|
CacheStrategy snippetFetchStrategy = (post == null) ? null : CacheStrategy.parse(post.get("verify", sb.getConfig("search.verify", "")));
|
|
|
|
|
|
|
|
|
@ -1027,7 +1028,7 @@ public class yacysearch {
|
|
|
|
|
|
|
|
|
|
prop.put("focus", focus ? 1 : 0); // focus search field
|
|
|
|
|
prop.put("searchagain", global ? "1" : "0");
|
|
|
|
|
String former = originalquerystring.replaceAll(Segment.catchallString, "*");
|
|
|
|
|
String former = originalquerystring.replaceAll(Segment.catchallString, "*"); // hide catchallString in output
|
|
|
|
|
prop.putHTML("former", former);
|
|
|
|
|
try {
|
|
|
|
|
prop.put("formerEncoded", URLEncoder.encode(former, StandardCharsets.UTF_8.name()));
|
|
|
|
|