mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Parser: Do not reuse byte array when trimming bfr [#562]
This commit is contained in:
@@ -90,7 +90,7 @@ class Xoh_toc_wkr__txt {
|
||||
|
||||
// add any text before tag
|
||||
if (pos < txt_end) {
|
||||
byte[] anch_bry = amp_mgr.Decode_as_bry(Bry_.Trim(src, pos, txt_end, Bool_.Y, Bool_.Y, Trim__anch)); // trim \n else ".0a"; PAGE:en.w:List_of_U-boats_never_deployed DATE:2016-08-13
|
||||
byte[] anch_bry = amp_mgr.Decode_as_bry(Bry_.Trim(src, pos, txt_end, Bool_.Y, Bool_.Y, Trim__anch, Bool_.Y)); // trim \n else ".0a"; PAGE:en.w:List_of_U-boats_never_deployed DATE:2016-08-13
|
||||
anch_encoder.Encode(anch_bfr, anch_bry);
|
||||
text_bfr.Add_mid(src, pos, txt_end);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public class Xog_tab_itm_edit_mgr {
|
||||
byte[] rv = tab.Html_itm().Get_elem_value_for_edit_box_as_bry();
|
||||
if (orig != null) // orig == null for Preview
|
||||
rv = tab.Wiki().Parser_mgr().Hdr__section_editable__mgr().Merge_section(tab.Page().Url(), rv, orig);
|
||||
rv = Bry_.Trim(rv, 0, rv.length, false, true, Bry_.Trim_ary_ws); // MW: trim all trailing ws; REF:EditPage.php!safeUnicodeInput; DATE:2014-04-25
|
||||
rv = Bry_.Trim(rv, 0, rv.length, false, true, Bry_.Trim_ary_ws, true); // MW: trim all trailing ws; REF:EditPage.php!safeUnicodeInput; DATE:2014-04-25
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Wbase_repo_linker {
|
||||
private byte[] articlePath;
|
||||
// private byte[] scriptPath;
|
||||
public Wbase_repo_linker(byte[] baseUrl, byte[] articlePath, byte[] scriptPath) {
|
||||
this.baseUrl = Bry_.Trim(baseUrl, 0, baseUrl.length, false, true, Bry_.mask_(256, Byte_ascii.Slash_bry)); // getBaseUrl
|
||||
this.baseUrl = Bry_.Trim(baseUrl, 0, baseUrl.length, false, true, Bry_.mask_(256, Byte_ascii.Slash_bry), true); // getBaseUrl
|
||||
this.articlePath = articlePath;
|
||||
// this.scriptPath = scriptPath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user