diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2013-08-07 13:26:21 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2013-08-07 13:26:21 -0400 |
commit | 24d2063654f6f229f520972b43c946741a909cf0 (patch) | |
tree | 3b67eac6623676e6b93e0eac486658f90eb9488a | |
parent | a29350364b3b340dfa74382f7b61e33f446ddf4d (diff) |
Make the parser handle TEXTAREA contents in verbatim mode
It also served to avoid bugs due to nested content in textarea, but this
is handled separately now by the parser (see nested_inputs patch) allowing
the parsing mode to be changed without side effects.
BTW, this patch mimics Firefox's behaviour.
-rw-r--r-- | src/html.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc index eb6f3909..c39a3dde 100644 --- a/src/html.cc +++ b/src/html.cc @@ -3663,7 +3663,9 @@ static void Html_process_tag(DilloHtml *html, char *tag, int tagsize) if (html->stop_parser) break; - if (S_TOP(html)->parse_mode != DILLO_HTML_PARSE_MODE_PRE && + if (S_TOP(html)->parse_mode == DILLO_HTML_PARSE_MODE_VERBATIM) { + /* don't change anything */ + } else if (S_TOP(html)->parse_mode != DILLO_HTML_PARSE_MODE_PRE && (html->styleEngine->style ()->whiteSpace == WHITE_SPACE_PRE || html->styleEngine->style ()->whiteSpace == WHITE_SPACE_PRE_WRAP)) { S_TOP(html)->parse_mode = DILLO_HTML_PARSE_MODE_PRE; |