summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/form.cc8
-rw-r--r--src/form.hh1
-rw-r--r--src/html.cc2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/form.cc b/src/form.cc
index 6f272b8f..8ec340bb 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -823,6 +823,14 @@ void Html_tag_open_option(DilloHtml *html, const char *tag, int tagsize)
a_Html_stash_init(html);
}
+void Html_tag_close_option(DilloHtml *html)
+{
+ if (html->InFlags & IN_OPTION) {
+ Html_option_finish(html);
+ html->InFlags &= ~IN_OPTION;
+ }
+}
+
/*
* <BUTTON>
*/
diff --git a/src/form.hh b/src/form.hh
index 297442e0..640e7e69 100644
--- a/src/form.hh
+++ b/src/form.hh
@@ -57,6 +57,7 @@ void Html_tag_close_textarea(DilloHtml *html);
void Html_tag_open_select(DilloHtml *html, const char *tag, int tagsize);
void Html_tag_close_select(DilloHtml *html);
void Html_tag_open_option(DilloHtml *html, const char *tag, int tagsize);
+void Html_tag_close_option(DilloHtml *html);
void Html_tag_open_button(DilloHtml *html, const char *tag, int tagsize);
void Html_tag_close_button(DilloHtml *html);
diff --git a/src/html.cc b/src/html.cc
index 8e0af8a9..20a7f7d5 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3195,7 +3195,7 @@ const TagInfo Tags[] = {
{"object", B8(111101),'R',2, Html_tag_open_object, NULL, NULL},
{"ol", B8(011010),'R',2, Html_tag_open_ol, NULL, NULL},
/* optgroup */
- {"option", B8(010001),'O',1, Html_tag_open_option, NULL, NULL},
+ {"option", B8(010001),'O',1, Html_tag_open_option,NULL,Html_tag_close_option},
{"p", B8(010110),'O',1, Html_tag_open_p, NULL, NULL},
/* param 010001 'F' */
{"pre", B8(010110),'R',2, Html_tag_open_pre, NULL, Html_tag_close_pre},