diff --git a/htroot/js/yacyinteractive.js b/htroot/js/yacyinteractive.js index 045092408..9c99d37b0 100644 --- a/htroot/js/yacyinteractive.js +++ b/htroot/js/yacyinteractive.js @@ -78,7 +78,7 @@ function preparepage(str) { if (modifier != "") modifiertype = modifier.substring(modifier.length - 3) - if (modifiertype == "png" || modifiertype == "gif" || modifiertype == "jpg") { + if (modifiertype == "png" || modifiertype == "gif" || modifiertype == "jpg" || modifiertype == "PNG" || modifiertype == "GIF" || modifiertype == "JPG") { var tt = resultImages(); document.getElementById("searchresults").innerHTML = tt; } else { @@ -220,8 +220,8 @@ function resultLine(type, item, linenumber) { if (type == "image") { html += "
"; html += ""; - //html += "\"""; - html += "\"""; + html += "\"""; + //html += "\"""; html += ""; var name = title; while ((p = name.indexOf("/")) >= 0) { name = name.substring(p + 1); } diff --git a/source/net/yacy/search/query/QueryParams.java b/source/net/yacy/search/query/QueryParams.java index 0b3b20342..80d74e3ea 100644 --- a/source/net/yacy/search/query/QueryParams.java +++ b/source/net/yacy/search/query/QueryParams.java @@ -111,9 +111,11 @@ public final class QueryParams { private final QueryGoal queryGoal; public int itemsPerPage; public int offset; - public final Pattern urlMask, prefer; + public Pattern urlMask; + + public final Pattern prefer; public final String protocol, tld, ext; - final boolean urlMask_isCatchall; + boolean urlMask_isCatchall; public final Classification.ContentDomain contentdom; public final String targetlang; protected final Collection metatags; @@ -246,6 +248,20 @@ public final class QueryParams { throw new IllegalArgumentException("Not a valid regular expression: " + urlMask, ex); } this.urlMask_isCatchall = this.urlMask.toString().equals(catchall_pattern.toString()); + if (this.urlMask_isCatchall) { + if (protocol != null) { + this.urlMask = Pattern.compile(protocol + ".*"); + this.urlMask_isCatchall = false; + } + if (tld != null) { + this.urlMask = Pattern.compile(".*" + tld + ".*"); + this.urlMask_isCatchall = false; + } + if (ext != null) { + this.urlMask = Pattern.compile(".*" + ext + ".*"); + this.urlMask_isCatchall = false; + } + } this.protocol = protocol; this.tld = tld; this.ext = ext;