diff options
author | corvid <corvid@dillo.org> | 2013-09-06 04:41:23 +0000 |
---|---|---|
committer | corvid <corvid@dillo.org> | 2013-09-06 04:41:23 +0000 |
commit | a3792d0bf71581f58970091521967e1558f3ecc3 (patch) | |
tree | 9db181a076a7e58929c0a6542e2bc53858cb8c8f | |
parent | 504cc39617fa79624acb5bd0ac86fd73a050bcce (diff) |
html5, cols/rows not required for TEXTAREA
-rw-r--r-- | src/form.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/form.cc b/src/form.cc index ab2aeec3..f756a1c9 100644 --- a/src/form.cc +++ b/src/form.cc @@ -639,7 +639,8 @@ void Html_tag_content_textarea(DilloHtml *html, const char *tag, int tagsize) if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cols"))) { cols = strtol(attrbuf, NULL, 10); } else { - BUG_MSG("cols attribute is required for <textarea>\n"); + if (html->DocType != DT_HTML || html->DocTypeVersion <= 4.01f) + BUG_MSG("cols attribute is required for <textarea>\n"); cols = 20; } if (cols < 1 || cols > MAX_COLS) { @@ -650,7 +651,8 @@ void Html_tag_content_textarea(DilloHtml *html, const char *tag, int tagsize) if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "rows"))) { rows = strtol(attrbuf, NULL, 10); } else { - BUG_MSG("rows attribute is required for <textarea>\n"); + if (html->DocType != DT_HTML || html->DocTypeVersion <= 4.01f) + BUG_MSG("rows attribute is required for <textarea>\n"); rows = 10; } if (rows < 1 || rows > MAX_ROWS) { |