diff --git a/400_xowa/src/gplx/xowa/parsers/xndes/Xop_xnde_wkr.java b/400_xowa/src/gplx/xowa/parsers/xndes/Xop_xnde_wkr.java
index 18dbf338a..15cc146e6 100644
--- a/400_xowa/src/gplx/xowa/parsers/xndes/Xop_xnde_wkr.java
+++ b/400_xowa/src/gplx/xowa/parsers/xndes/Xop_xnde_wkr.java
@@ -580,7 +580,7 @@ public class Xop_xnde_wkr implements Xop_ctx_wkr {
if (close_bgn == Bry_find_.Not_found) auto_close = true; // auto-close if end not found; verified with , , , , DATE:2014-08-23
int close_end = -1;
if (auto_close) {
- xnde_end = close_bgn = close_end = src_len;
+ return ctx.Lxr_make_txt_(open_end); // dangling tags are now escaped; used to gobble up rest of page with "xnde_end = close_bgn = close_end = src_len;"; DATE:2017-01-10
}
else {
close_end = Find_end_tag_pos(src, src_len, close_bgn + close_bry.length);
diff --git a/400_xowa/src/gplx/xowa/xtns/cites/References_nde_rare_tst.java b/400_xowa/src/gplx/xowa/xtns/cites/References_nde_rare_tst.java
index 1987e8083..44473cd7d 100644
--- a/400_xowa/src/gplx/xowa/xtns/cites/References_nde_rare_tst.java
+++ b/400_xowa/src/gplx/xowa/xtns/cites/References_nde_rare_tst.java
@@ -93,15 +93,14 @@ public class References_nde_rare_tst {
}
@Test public void Dangling_ref_and_stack_overflow() { // PURPOSE: handle dangling [ with nested ; PAGE:cs.s:Page:HejĨl,_Jan_-_Pentateuch.pdf/128 DATE:2016-09-01
fxt.Test_parse_page_all_str(String_.Concat_lines_nl_skip_last
- ( "a]b"
- , "[c"
+ ( "a][b]c"
+ , "[d"
, "" // must be ignored, else it will be same as outer
, ""
), String_.Concat_lines_nl_skip_last
- ( "a[1]b"
+ ( "a[1]c"
, "]"
- , "- ^ c"
- , "
"
+ , "- ^ b
"
, "
"
, ""
));
diff --git a/400_xowa/src/gplx/xowa/xtns/dynamicPageList/Dpl_xnde_tst.java b/400_xowa/src/gplx/xowa/xtns/dynamicPageList/Dpl_xnde_tst.java
index 91908cae4..8f9d72989 100644
--- a/400_xowa/src/gplx/xowa/xtns/dynamicPageList/Dpl_xnde_tst.java
+++ b/400_xowa/src/gplx/xowa/xtns/dynamicPageList/Dpl_xnde_tst.java
@@ -274,13 +274,16 @@ public class Dpl_xnde_tst {
));
}
@Test public void Err__bad_key_causes_out_of_bound() { // PURPOSE: bad key causes out of bounds error; PAGE:de.n:Portal:Brandenburg DATE:2016-04-21
- fxt.Init__warns("dynamic_page_list:unknown_key: page=Test page key=category", "dynamic_page_list:unknown_key: page=Test page key=category");
fxt.Exec__parse
( ""
, "category=Aa=b c=d"
, "category=B"
);
- fxt.Test__html("No pages meet these criteria.");
+ fxt.Test__html(String_.Concat_lines_nl_skip_last
+ ( "<DynamicPageList>"
+ , "No pages meet these criteria.a=b c=d"
+ , "No pages meet these criteria."
+ ));
}
}
class Dpl_page_mok {
diff --git a/400_xowa/src/gplx/xowa/xtns/gallery/Gallery_mgr_base__basic__tst.java b/400_xowa/src/gplx/xowa/xtns/gallery/Gallery_mgr_base__basic__tst.java
index dff0889da..bb64de16c 100644
--- a/400_xowa/src/gplx/xowa/xtns/gallery/Gallery_mgr_base__basic__tst.java
+++ b/400_xowa/src/gplx/xowa/xtns/gallery/Gallery_mgr_base__basic__tst.java
@@ -140,7 +140,7 @@ public class Gallery_mgr_base__basic__tst {
));
}
@Test public void Dangling_autcloses() { // PURPOSE: dangling gallery should auto-close, not escape; PAGE:en.w:Wikipedia:Featured_pictures_thumbs_43 DATE:2014-08-23
- fxt.Test_html_frag("File:A.png|b", "File:A.png|b", "<gallery>File:A.png|b");
}
@Test public void Nested() { // PURPOSE: handle gallery nested inside ref; PAGE: es.w:Arquitectura_medieval DATE:2015-07-10
fxt.Test_html_frag(String_.Concat_lines_nl_skip_last
@@ -153,7 +153,7 @@ public class Gallery_mgr_base__basic__tst {
);
}
@Test public void Alt__quotes() { // PURPOSE: file name with quotes will cause broken alt; PAGE:en.w:en.w:Alexandria,_Romania; DATE:2015-12-27
- fxt.Test_html_frag("File:A\"b.png", "alt=\"A"b.png\""); // NOTE: not 'alt="A"b.png"'
+ fxt.Test_html_frag("File:A\"b.png", "alt=\"A"b.png\""); // NOTE: not 'alt="A"b.png"'
}
@Test public void Invalid() { // PURPOSE: ignore invalid file names; DATE:2016-01-12
fxt.Test_html_str("File:#A.png|a"
diff --git a/400_xowa/src/gplx/xowa/xtns/poems/Poem_nde_tst.java b/400_xowa/src/gplx/xowa/xtns/poems/Poem_nde_tst.java
index 378979f7d..a55671742 100644
--- a/400_xowa/src/gplx/xowa/xtns/poems/Poem_nde_tst.java
+++ b/400_xowa/src/gplx/xowa/xtns/poems/Poem_nde_tst.java
@@ -18,7 +18,7 @@ along with this program. If not, see .
package gplx.xowa.xtns.poems; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*;
public class Poem_nde_tst {
- @Before public void init() {fxt.Wiki().Xtn_mgr().Init_by_wiki(fxt.Wiki());} private final Xop_fxt fxt = new Xop_fxt();
+ @Before public void init() {fxt.Wiki().Xtn_mgr().Init_by_wiki(fxt.Wiki());} private final Xop_fxt fxt = new Xop_fxt();
@Test public void Lines() { // NOTE: first \n (poem\n) and last \n (\n
)ignored
fxt.Test_parse_page_wiki_str(String_.Concat_lines_nl_skip_last
( ""
@@ -136,12 +136,7 @@ public class Poem_nde_tst {
, ""
, "