aboutsummaryrefslogtreecommitdiffstats
path: root/WWW/Library
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2022-06-13 00:23:57 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2022-06-13 00:23:57 +0000
commit37961f38962e91a8a2c24ec9d9c9fc111b3dbad4 (patch)
tree90caa88868fe74ace75667083a69daa257de802f /WWW/Library
parent409ae09bd0a4ca5e01f1482a6f1148c581586125 (diff)
downloadlynx-snapshots-37961f38962e91a8a2c24ec9d9c9fc111b3dbad4.tar.gz
snapshot of project "lynx", label v2-9-0dev_10h
Diffstat (limited to 'WWW/Library')
-rw-r--r--WWW/Library/Implementation/SGML.c18
-rw-r--r--WWW/Library/Implementation/SGML.h6
2 files changed, 16 insertions, 8 deletions
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index d120644b..2534606e 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,5 +1,5 @@
/*
- * $LynxId: SGML.c,v 1.182 2021/10/24 22:18:29 tom Exp $
+ * $LynxId: SGML.c,v 1.183 2022/06/13 00:20:50 tom Exp $
*
* General SGML Parser code SGML.c
* ========================
@@ -1621,7 +1621,8 @@ static BOOL ignore_when_empty(HTTag * tag)
&& !(tag->flags & Tgf_mafse)
&& tag->contents != SGML_EMPTY
&& tag->tagclass != Tgc_Plike
- && (tag->tagclass == Tgc_SELECTlike
+ && (tag->tagclass == Tgc_APPLETlike
+ || tag->tagclass == Tgc_SELECTlike
|| (tag->contains && tag->icontains))) {
result = TRUE;
}
@@ -3644,9 +3645,9 @@ static void SGML_character(HTStream *me, int c_in)
case S_attr:
if (WHITE(c) || (c == '>') || (c == '=')) { /* End of word */
if ((c == '>')
- && (string->size == 1)
- && (string->data[0] == '/')) {
- if (me->extended_html
+ && (string->size >= 1)
+ && (string->data[string->size - 1] == '/')) {
+ if ((LYxhtml_parsing || me->extended_html)
&& ignore_when_empty(me->current_tag)) {
discard_empty(me);
}
@@ -4590,7 +4591,8 @@ const HTStreamClass SGMLParser =
HTStream *SGML_new(const SGML_dtd * dtd,
HTParentAnchor *anchor,
- HTStructured * target)
+ HTStructured * target,
+ int extended_html)
{
HTStream *me = typecalloc(struct _HTStream);
@@ -4660,6 +4662,10 @@ HTStream *SGML_new(const SGML_dtd * dtd,
sgml_in_psrc_was_initialized = TRUE;
}
#endif
+ if (extended_html)
+ {
+ me->extended_html = TRUE;
+ }
sgml_offset = 0;
return me;
diff --git a/WWW/Library/Implementation/SGML.h b/WWW/Library/Implementation/SGML.h
index 8b6445f6..7da79762 100644
--- a/WWW/Library/Implementation/SGML.h
+++ b/WWW/Library/Implementation/SGML.h
@@ -1,5 +1,5 @@
/*
- * $LynxId: SGML.h,v 1.47 2021/07/22 23:34:13 tom Exp $
+ * $LynxId: SGML.h,v 1.48 2022/06/12 20:19:04 tom Exp $
* SGML parse and stream definition for libwww
* SGML AND STRUCTURED STREAMS
*
@@ -281,7 +281,9 @@ Create an SGML parser
*/
extern HTStream *SGML_new(const SGML_dtd * dtd,
HTParentAnchor *anchor,
- HTStructured * target);
+ HTStructured * target,
+ int extended_html)
+ ;
extern const HTStreamClass SGMLParser;