about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-25 22:49:32 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-25 22:49:32 +0200
commit3fb64fd6c7e747f76e47576ba37b3d05abd9e2fe (patch)
treef682b8c5fcf4e7f926d6ef67ce7570acf276d807 /src/html
parent6a370551ae9e1217aa4fe60009208783f7e3245d (diff)
downloadchawan-3fb64fd6c7e747f76e47576ba37b3d05abd9e2fe.tar.gz
html: include SEARCH tag in parser
Diffstat (limited to 'src/html')
-rw-r--r--src/html/htmlparser.nim5
-rw-r--r--src/html/tags.nim7
2 files changed, 7 insertions, 5 deletions
diff --git a/src/html/htmlparser.nim b/src/html/htmlparser.nim
index 0791a3af..76ccd407 100644
--- a/src/html/htmlparser.nim
+++ b/src/html/htmlparser.nim
@@ -1637,7 +1637,8 @@ proc processInHTMLContent[Handle](parser: var HTML5Parser[Handle],
       ("<address>", "<article>", "<aside>", "<blockquote>", "<center>",
       "<details>", "<dialog>", "<dir>", "<div>", "<dl>", "<fieldset>",
       "<figcaption>", "<figure>", "<footer>", "<header>", "<hgroup>", "<main>",
-      "<menu>", "<nav>", "<ol>", "<p>", "<section>", "<summary>", "<ul>") => (block:
+      "<menu>", "<nav>", "<ol>", "<p>", "<search>", "<section>", "<summary>",
+      "<ul>") => (block:
         if parser.hasElementInButtonScope(TAG_P):
           parser.closeP()
         discard parser.insertHTMLElement(token)
@@ -1728,7 +1729,7 @@ proc processInHTMLContent[Handle](parser: var HTML5Parser[Handle],
        "</center>", "</details>", "</dialog>", "</dir>", "</div>", "</dl>",
        "</fieldset>", "</figcaption>", "</figure>", "</footer>", "</header>",
        "</hgroup>", "</listing>", "</main>", "</menu>", "</nav>", "</ol>",
-       "</pre>", "</section>", "</summary>", "</ul>") => (block:
+       "</pre>", "</search>", "</section>", "</summary>", "</ul>") => (block:
         if not parser.hasElementInScope(token.tagtype):
           parse_error ELEMENT_NOT_IN_SCOPE
         else:
diff --git a/src/html/tags.nim b/src/html/tags.nim
index dabc8a8b..4f7bba53 100644
--- a/src/html/tags.nim
+++ b/src/html/tags.nim
@@ -179,7 +179,8 @@ const SpecialElements* = {
  TAG_IFRAME, TAG_IMG, TAG_INPUT, TAG_KEYGEN, TAG_LI, TAG_LINK, TAG_LISTING,
  TAG_MAIN, TAG_MARQUEE, TAG_MENU, TAG_META, TAG_NAV, TAG_NOEMBED, TAG_NOFRAMES,
  TAG_NOSCRIPT, TAG_OBJECT, TAG_OL, TAG_P, TAG_PARAM, TAG_PLAINTEXT, TAG_PRE,
- TAG_SCRIPT, TAG_SECTION, TAG_SELECT, TAG_SOURCE, TAG_STYLE, TAG_SUMMARY,
- TAG_TABLE, TAG_TBODY, TAG_TD, TAG_TEMPLATE, TAG_TEXTAREA, TAG_TFOOT, TAG_TH,
- TAG_THEAD, TAG_TITLE, TAG_TR, TAG_TRACK, TAG_UL, TAG_WBR, TAG_XMP 
+ TAG_SCRIPT, TAG_SEARCH, TAG_SECTION, TAG_SELECT, TAG_SOURCE, TAG_STYLE,
+ TAG_SUMMARY, TAG_TABLE, TAG_TBODY, TAG_TD, TAG_TEMPLATE, TAG_TEXTAREA,
+ TAG_TFOOT, TAG_TH, TAG_THEAD, TAG_TITLE, TAG_TR, TAG_TRACK, TAG_UL, TAG_WBR,
+ TAG_XMP
 }