1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Parser: Escape dangling tags; do not let them gobble up rest of page

This commit is contained in:
gnosygnu
2017-01-10 14:01:04 -05:00
parent f7b088e7a8
commit 08eb098422
5 changed files with 14 additions and 17 deletions

View File

@@ -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 <poem>, <gallery>, <imagemap>, <hiero>, <references> 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);