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

v1.10.2.1

This commit is contained in:
gnosygnu
2014-10-13 00:13:41 -04:00
parent cd5a440404
commit d6561b3c1f
514 changed files with 1899 additions and 1696 deletions

View File

@@ -67,10 +67,10 @@ public class Xoh_dom_ {
public static String Title_by_href(Url_encoder encoder, Bry_bfr bfr, byte[] href_dec, byte[] html_src) {
int slash_pos = Bry_finder.Find_bwd(href_dec, Byte_ascii.Slash);
encoder.Encode(bfr, href_dec, slash_pos + 1, href_dec.length);
byte[] name_enc = bfr.XtoAryAndClear();
byte[] name_enc = bfr.Xto_bry_and_clear();
bfr.Add_mid(href_dec, 0, slash_pos + Int_.Const_dlm_len); // include trailing slash
bfr.Add(name_enc);
byte[] href_enc = bfr.XtoAryAndClear();
byte[] href_enc = bfr.Xto_bry_and_clear();
byte[] xowa_title = Xoh_dom_.Query_val_by_where(dom_find, html_src, Html_tag_.A_name_bry, Html_atr_.Href_bry, href_enc, gplx.xowa.html.Xoh_consts.Atr_xowa_title_bry, 0);
return String_.new_utf8_(xowa_title);
} static final Xoh_find dom_find = new Xoh_find();

View File

@@ -108,7 +108,7 @@ class Xoh_fil_main_fxt {
file.Init_for_test__img(html_w, html_h, Bry_.new_utf8_(html_src), Bry_.new_utf8_(html_orig_src));
file.Set__ttl(ttl_bry, Bry_.Empty);
wkr.Bld_html(wiki, bfr, file, ttl, opt, Bry_.XtoStrBytesByInt(html_file_size, 0), play_btn_icon, 0); // TEST: must pass in elem_val b/c test only uses 2nd Bld_html while app uses 1st
Tfds.Eq_str_lines(expd, bfr.XtoStrAndClear());
Tfds.Eq_str_lines(expd, bfr.Xto_str_and_clear());
} static final byte[] play_btn_icon = Bry_.new_ascii_("file:///mem/xowa/user/test_user/app/img/file/play.png");
public static final String Hdr = String_.Concat_lines_nl_skip_last
( "<ul id=\"filetoc\">"

View File

@@ -39,7 +39,7 @@ public class Xop_link_parser {
else // regular url
tmp_bfr.Add(raw); // dump everything
}
raw = tmp_bfr.XtoAryAndClear();
raw = tmp_bfr.Xto_bry_and_clear();
html_anchor_cls = Xow_html_mgr.Bry_anchor_class_blank;
html_anchor_rel = Xow_html_mgr.Bry_anchor_rel_nofollow;
break;
@@ -51,7 +51,7 @@ public class Xop_link_parser {
html_xowa_ttl = Bry_.Mid(raw, slash_pos + Int_.Const_dlm_len, raw.length);
}
else // next char is not slash; assume xfer_itm refers to ns; EX:File:A.png
raw = tmp_bfr.Add(Xoh_href_parser.Href_wiki_bry).Add(raw).XtoAryAndClear();
raw = tmp_bfr.Add(Xoh_href_parser.Href_wiki_bry).Add(raw).Xto_bry_and_clear();
break;
default: // is page only; EX: Abc
if (Bry_.Len_eq_0(raw)) // NOTE: handle blank link; EX: [[File:Loudspeaker.svg|11px|link=|alt=play]]
@@ -62,7 +62,7 @@ public class Xop_link_parser {
tmp_bfr.Clear();
return null;
}
raw = tmp_bfr.XtoAryAndClear();
raw = tmp_bfr.Xto_bry_and_clear();
}
break;
}