mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Http_server: Do not fail if Search has invalid title characters
This commit is contained in:
parent
1db737405f
commit
7c2e3f7295
@ -67,7 +67,8 @@ public class Swt_btn_no_border implements GxwElem, Swt_control {
|
|||||||
// for night mode, SWT introduces white pixels
|
// for night mode, SWT introduces white pixels
|
||||||
// so resize only if height is different knowing that (a) btns have height of 16px and (b) day=32px; night=16px
|
// so resize only if height is different knowing that (a) btns have height of 16px and (b) day=32px; night=16px
|
||||||
// note can't use width, b/c search_exec_btn somehow goes from 16px to 20px
|
// note can't use width, b/c search_exec_btn somehow goes from 16px to 20px
|
||||||
if (v.Size().Height() != size.Height())
|
if ( v.Size().Height() != size.Height()
|
||||||
|
&& size.Width() != 0) // WORKAROUND.SWT: width is 0 due to "need to specify height" workaround on 2017-03-28; however, can't set 0 width else SWT will throw error; DATE:2017-07-23
|
||||||
v = v.Resize(size.Width(), size.Height());
|
v = v.Resize(size.Width(), size.Height());
|
||||||
if ((v.Under() instanceof Image)) { // check needed else will fail when image doesn't exist; DATE:2017-06-03
|
if ((v.Under() instanceof Image)) { // check needed else will fail when image doesn't exist; DATE:2017-06-03
|
||||||
box_btn.setImage(Copy_w_transparency((Image)v.Under()));
|
box_btn.setImage(Copy_w_transparency((Image)v.Under()));
|
||||||
|
@ -30,8 +30,8 @@ public class Xoa_app_ {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static final String Name = "xowa";
|
public static final String Name = "xowa";
|
||||||
public static final int Version_id = 534;
|
public static final int Version_id = 535;
|
||||||
public static final String Version = "4.5.12.1707";
|
public static final String Version = "4.5.13.1707";
|
||||||
public static String Build_date = "2012-12-30 00:00:00";
|
public static String Build_date = "2012-12-30 00:00:00";
|
||||||
public static String Build_date_fmt = "yyyy-MM-dd HH:mm:ss";
|
public static String Build_date_fmt = "yyyy-MM-dd HH:mm:ss";
|
||||||
public static String Op_sys_str;
|
public static String Op_sys_str;
|
||||||
|
@ -105,7 +105,7 @@ public class Http_server_mgr implements Gfo_invk {
|
|||||||
// get the url / ttl
|
// get the url / ttl
|
||||||
if (Bry_.Len_eq_0(ttl_bry)) ttl_bry = wiki.Props().Main_page();
|
if (Bry_.Len_eq_0(ttl_bry)) ttl_bry = wiki.Props().Main_page();
|
||||||
Xoa_url url = wiki.Utl__url_parser().Parse(ttl_bry);
|
Xoa_url url = wiki.Utl__url_parser().Parse(ttl_bry);
|
||||||
Xoa_ttl ttl = Xoa_ttl.Parse(wiki, ttl_bry);
|
Xoa_ttl ttl = Xoa_ttl.Parse(wiki, url.To_bry_page_w_anch());
|
||||||
|
|
||||||
// get the page
|
// get the page
|
||||||
gplx.xowa.guis.views.Xog_tab_itm tab = Gxw_html_server.Assert_tab2(app, wiki); // HACK: assert tab exists
|
gplx.xowa.guis.views.Xog_tab_itm tab = Gxw_html_server.Assert_tab2(app, wiki); // HACK: assert tab exists
|
||||||
|
@ -118,7 +118,7 @@ public class Xoh_file_wtr__video__tst {
|
|||||||
, "<div class=\"magnify\"><a href=\"/wiki/File:A.webm\" class=\"internal\" title=\"Enlarge\"></a></div>a"
|
, "<div class=\"magnify\"><a href=\"/wiki/File:A.webm\" class=\"internal\" title=\"Enlarge\"></a></div>a"
|
||||||
, " </div>"
|
, " </div>"
|
||||||
, " <div class=\"xowa_alt_text\">"
|
, " <div class=\"xowa_alt_text\">"
|
||||||
, " <hr/>"
|
, " <hr/>"
|
||||||
, " <div class=\"thumbcaption\">b"
|
, " <div class=\"thumbcaption\">b"
|
||||||
, " </div>"
|
, " </div>"
|
||||||
, " </div>"
|
, " </div>"
|
||||||
|
Loading…
Reference in New Issue
Block a user