private void Write_body_pre( Bry_bfr bfr, Xoae_app app, Xowe_wiki wiki, Xoh_wtr_ctx hctx, byte[] data_raw, Bry_bfr tmp_bfr) { Xoh_html_wtr_escaper.Escape( app.Parser_amp_mgr(), tmp_bfr, data_raw, 0, data_raw.length, false, false); if (hctx.Mode_is_hdump()) bfr.Add(data_raw); else app.Html_mgr().Page_mgr().Content_code_fmtr().Bld_bfr_many(bfr, tmp_bfr); tmp_bfr.Clear(); }
private void Write_body_edit(Bry_bfr bfr, byte[] data_raw, int ns_id, byte page_tid) { if (ns_id == Xow_ns_ .Tid__mediawiki // if MediaWiki and wikitext, must be a message; convert args back // to php; DATE:2014-06-13 && page_tid == Xow_page_tid.Tid_wikitext) data_raw = Gfs_php_converter.Xto_php(tmp_bfr, Bool_.N, data_raw); int data_raw_len = data_raw.length; if (mgr.Html_capable()) Xoh_html_wtr_escaper.Escape( page.Wikie().Appe().Parser_amp_mgr(), bfr, data_raw, 0, data_raw_len, false, false); // NOTE: must escape; assume that browser will automatically escape (<) (which // Mozilla does) else bfr.Add(data_raw); if (data_raw_len > 0) // do not add nl if empty String bfr .Add_byte_nl(); // per MW:EditPage.php: "Ensure there's a newline at the end, otherwise // adding lines is awkward." }