1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Http_server: Add special_pages_safelist

This commit is contained in:
gnosygnu
2017-07-22 08:25:08 -04:00
parent c1e66a7e7d
commit 1dbe526051
8 changed files with 44 additions and 5 deletions

View File

@@ -18,12 +18,15 @@ import gplx.core.net.qargs.*;
import gplx.dbs.*;
import gplx.xowa.specials.*; import gplx.langs.mustaches.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.wikis.pages.tags.*;
import gplx.xowa.addons.apps.cfgs.*;
import gplx.xowa.parsers.amps.*;
import gplx.xowa.htmls.core.htmls.*;
class Xofulltext_searcher_html extends Xow_special_wtr__base implements Mustache_doc_itm {
private final Hash_adp props = Hash_adp_.New();
private final Bry_bfr tmp_bfr = Bry_bfr_.New();
public Xofulltext_searcher_html(Xocfg_mgr cfg_mgr, Gfo_qarg_mgr url_args, Xow_wiki wiki, Guid_adp page_guid, boolean lucene_exists) {
String search_text = url_args.Read_str_or("search", "");
search_text = String_.Replace(search_text, "_", " "); // xofulltext_searcher.js chains multiple words with "_"; convert back to space
props.Add("qarg_search", search_text);
props.Add("qarg_search", Xoh_html_wtr_escaper.Escape_str(Xop_amp_mgr.Instance, tmp_bfr, search_text));
props.Add("page_guid", page_guid.To_str());
props.Add("cur_wiki", wiki.Domain_str());