diff --git a/400_xowa/src/gplx/xowa/parsers/Xow_parser_mgr.java b/400_xowa/src/gplx/xowa/parsers/Xow_parser_mgr.java index a075a46fc..4b1c00abc 100644 --- a/400_xowa/src/gplx/xowa/parsers/Xow_parser_mgr.java +++ b/400_xowa/src/gplx/xowa/parsers/Xow_parser_mgr.java @@ -49,6 +49,7 @@ public class Xow_parser_mgr { wbase__time__msgs = Wdata_hwtr_msgs.new_(wiki.Msg_mgr()); return wbase__time__msgs; } private Wdata_hwtr_msgs wbase__time__msgs; + public Bry_bfr Tmp_bfr() {return tmp_bfr;} private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public int Tag__next_idx() {return ++tag_idx;} private int tag_idx; // NOTE:must be wiki-level variable, not page-level, b/c pre-compiled templates can reserve tag #s; PAGE:de.s:Seite:NewtonPrincipien.djvu/465 DATE:2015-02-03 public void Tmpl_stack_del() {--tmpl_stack_ary_len;} public boolean Tmpl_stack_add(byte[] key) { diff --git a/400_xowa/src/gplx/xowa/xtns/pfuncs/ttls/Pfunc_urlencode.java b/400_xowa/src/gplx/xowa/xtns/pfuncs/ttls/Pfunc_urlencode.java index c16af0e3f..bfc8f44ce 100644 --- a/400_xowa/src/gplx/xowa/xtns/pfuncs/ttls/Pfunc_urlencode.java +++ b/400_xowa/src/gplx/xowa/xtns/pfuncs/ttls/Pfunc_urlencode.java @@ -24,8 +24,8 @@ public class Pfunc_urlencode extends Pf_func_base { // EX: {{urlencode:a b}} -> @Override public boolean Func_require_colon_arg() {return true;} @Override public void Func_evaluate(Bry_bfr bfr, Xop_ctx ctx, Xot_invk caller, Xot_invk self, byte[] src) { byte[] argx = Eval_argx(ctx, src, caller, self); if (argx == Bry_.Empty) return; - gplx.langs.htmls.encoders.Gfo_url_encoder_.Http_url.Encode(urlEncodeBfr, argx); - bfr.Add_bfr_and_preserve(urlEncodeBfr); - urlEncodeBfr.Clear(); - } private Bry_bfr urlEncodeBfr = Bry_bfr_.New_w_size(128); + Bry_bfr tmp_bfr = ctx.Wiki().Parser_mgr().Tmp_bfr(); + gplx.langs.htmls.encoders.Gfo_url_encoder_.Http_url.Encode(tmp_bfr, argx); + bfr.Add_bfr_and_clear(tmp_bfr); + } }