mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Pages: Do not escape <pages> if invalid attributes [#656]
This commit is contained in:
parent
af337493af
commit
bc2beba148
@ -44,6 +44,11 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
|
|||||||
unknown_xatrs.Add(new Pp_index_arg(xatr.Key_bry(), xatr.Val_as_bry()));
|
unknown_xatrs.Add(new Pp_index_arg(xatr.Key_bry(), xatr.Val_as_bry()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// skip valid xatrs with invalid values; EX: <pages index=\"A\" from=1 to 2 />; ISSUE#:656 DATE:2020-01-19
|
||||||
|
if (xatr.Val_bgn() == -1)
|
||||||
|
return;
|
||||||
|
|
||||||
Byte_obj_val xatr_id = (Byte_obj_val)xatr_id_obj;
|
Byte_obj_val xatr_id = (Byte_obj_val)xatr_id_obj;
|
||||||
byte[] val_bry = xatr.Val_as_bry();
|
byte[] val_bry = xatr.Val_as_bry();
|
||||||
switch (xatr_id.Val()) {
|
switch (xatr_id.Val()) {
|
||||||
|
@ -165,4 +165,14 @@ public class Pp_pages_nde_basic_tst {
|
|||||||
, "</p>"
|
, "</p>"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@Test public void Ignore_invalid_to() { // ISSUE#:656 DATE:2020-01-19
|
||||||
|
fxt.Init_page_create("Page:A/1", "A");
|
||||||
|
fxt.Init_page_create("Page:A/2", "B");
|
||||||
|
fxt.Init_page_create("Page:A/3", "C");
|
||||||
|
fxt.Test_parse_page_wiki_str("<pages index=\"A\" from=1 to 3 />", String_.Concat_lines_nl
|
||||||
|
( "<p>A B C " // fails if <pages index="A" from=1 to 3 />
|
||||||
|
, "</p>"
|
||||||
|
, ""
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user