diff --git a/htroot/yacy/user/ysearch.java b/htroot/yacy/user/ysearch.java index 846496a18..667eff9a5 100644 --- a/htroot/yacy/user/ysearch.java +++ b/htroot/yacy/user/ysearch.java @@ -107,7 +107,7 @@ public class ysearch { } if (sb.facilityDB != null) try { sb.facilityDB.update("zeitgeist", querystring, post); } catch (Exception e) {} - int itemsPerPage = Math.max((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative + int itemsPerPage = Math.min((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative int offset = post.getInt("startRecord", post.getInt("offset", 0)); boolean global = (post == null) ? true : post.get("resource", "global").equals("global"); diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 2d98f1f9f..f03770ada 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -138,7 +138,7 @@ public class yacysearch { } if (sb.facilityDB != null) try { sb.facilityDB.update("zeitgeist", querystring, post); } catch (Exception e) {} - int itemsPerPage = Math.max((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative + int itemsPerPage = Math.min((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative int offset = post.getInt("startRecord", post.getInt("offset", 0)); boolean global = (post == null) ? true : post.get("resource", "global").equals("global"); diff --git a/source/de/anomic/htmlFilter/htmlFilterAbstractScraper.java b/source/de/anomic/htmlFilter/htmlFilterAbstractScraper.java index 8aa8842bd..e0bbfeb61 100644 --- a/source/de/anomic/htmlFilter/htmlFilterAbstractScraper.java +++ b/source/de/anomic/htmlFilter/htmlFilterAbstractScraper.java @@ -411,9 +411,17 @@ public abstract class htmlFilterAbstractScraper implements htmlFilterScraper { } private static char[] transscript(char[] code) { - String t = (String) trans.get(new String(code)); - if (t == null) return new char[0]; - return t.toCharArray(); + if (code[1] == '#') { + if (code[2] == 'x' || code[2] == 'X') { + return new char[] {(char) Integer.parseInt((new String(code)).substring(3, code.length - 1), 16)}; + } else { + return new char[] {(char) Integer.parseInt((new String(code)).substring(2, code.length - 1))}; + } + } else { + String t = (String) trans.get(new String(code)); + if (t == null) return new char[0]; + return t.toCharArray(); + } } protected static serverCharBuffer transscriptAll(serverCharBuffer bb) {