@TestpublicvoidVal_quote_none_ws(){fxt.tst_(" b ",fxt.new_atr_("b","b"));}// PURPOSE:discovered while writing test for ref's "lower-alpha" DATE:2014-07-03
ctx.Msg_log().Add_itm_none(Xop_xnde_log.Dangling_xnde,src,xnde.Src_bgn(),xnde.Name_end());// NOTE: xnde.Src_bgn to start at <; xnde.Name_end b/c xnde.Src_end is -1
@@ -134,8 +135,12 @@ public class Xop_xnde_wkr implements Xop_ctx_wkr {
intname_bgn_pos=i+1;
if(name_bgn_pos<src_len){// chk that name_bgn is less than src_len else arrayIndex error; EX: <ref><p></p<<ref/>; not that "<" is last char of String; DATE:2014-01-18
intvalid_inner_xnde_gt=atr_parser.Xnde_find_gt_find(src,name_bgn_pos,src_len);// check if <nowiki>, <noinclude>, <includeonly> or <onlyinclude> (which can exist inside tag)
if(valid_inner_xnde_gt==String_.Find_none)// not a <nowiki>; escape text; EX: "<div </div>" -> "<div </div>"; SEE:it.u:; DATE:2014-02-03
returnctx.Lxr_make_txt_(cur_pos);
if(valid_inner_xnde_gt==String_.Find_none){// not a <nowiki>
switch(tag.Id()){
caseXop_xnde_tag_.Tid_input:break;// noop; needed for Options which may have < in value; DATE:2014-07-04
fxt.Test_parse_page_all_str("<pre>a<nowiki><<nowiki>b</pre>","<pre>a<nowiki><<nowiki>b</pre>");// not closed
fxt.Test_parse_page_all_str("<pre><nowiki>a<nowiki>b</nowiki>c</nowiki></pre>","<pre><nowiki>abc</nowiki></pre>");// nested; this is wrong, but leave for now; should be a<nowiki>b</nowiki>c
}
@TestpublicvoidPrew(){// PURPOSE: space inside nowiki should be ignored; ru.b:Rubyn DATE:2014-07-03
@@ -40,6 +40,11 @@ public class Xop_xnde_wkr__xatrs_tst {
@TestpublicvoidId_encode(){
fxt.Test_parse_page_all_str("<div id=\"a b c\"></div>","<div id=\"a_b_c\"></div>");
}
@TestpublicvoidLt_should_not_be_escaped_in_input(){// PURPOSE: options textboxes were escaped if input's value had "<"; DATE:2014-07-04
fxt.Page().Html_data().Restricted_n_();
fxt.Test_parse_page_wiki_str("<input value='a<'></input>","<input value='a<'></input>");// NOTE: do not call parse_page_all_str which will call Page.Clear and reset Restricted
fxt.Page().Html_data().Restricted_y_();
}
// @Test public void Unclosed() { // PURPOSE: unclosed atr should be treated as key, which should be ignored; EX.WP:Palace of Versailles
// ( "<span id=\"1<>>a" // id="1<> -> key named 'id="1<>' which fails whitelist keys
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.