if t.type is TYPE_START_TAG and t.name is 'title'
parse_generic_rcdata_text t
return
- if t.type is TYPE_START_TAG and ((t.name is 'noscript' and flag_scripting) or (t.name is 'noframes' or t.name is 'style'))
+ if t.type is TYPE_START_TAG and ((t.name is 'noscript' and flag_scripting) or t.name is 'noframes' or t.name is 'style')
parse_generic_raw_text t
return
if t.type is TYPE_START_TAG and t.name is 'noscript' and flag_scripting is false
if t.type is TYPE_DOCTYPE
parse_error()
return
- if t.type is TYPE_START_TAG
+ if t.type is TYPE_START_TAG and t.name is 'html'
ins_mode_in_body t
return
if t.type is TYPE_END_TAG and t.name is 'noscript'
open_els.shift()
ins_mode = ins_mode_in_head
return
- if (t.type is TYPE_TEXT and (t.text is "\t" or t.text is "\u000a" or t.text is "\u000c" or t.text is "\u000d" or t.text is ' ')) or t.type is TYPE_COMMENT or (t.type is TYPE_START_TAG and (t.name is 'basefont' or t.name is 'bgsound' or t.name is 'link' or t.name is 'meta' or t.name is 'noframes' or t.name is 'style'))
+ if is_space_tok(t) or t.type is TYPE_COMMENT or (t.type is TYPE_START_TAG and (t.name is 'basefont' or t.name is 'bgsound' or t.name is 'link' or t.name is 'meta' or t.name is 'noframes' or t.name is 'style'))
ins_mode_in_head t
return
if t.type is TYPE_END_TAG and t.name is 'br'
tok_state = tok_state_comment_start_dash
when "\u0000"
parse_error()
+ tok_state = tok_state_comment
return new_character_token "\ufffd"
when '>'
parse_error()
return tok_cur_tag
else
tok_cur_tag.text += c
+ tok_state = tok_state_comment
return null
# 8.2.4.47 http://www.w3.org/TR/html5/syntax.html#comment-start-dash-state
}, {
name: "tests16.dat #84"
html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
+ scripting: true
errors: 1
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| \"<!--<noscript>\"\n| <body>\n| \"-->\"\n"
}, {
name: "tests16.dat #85"
html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
+ scripting: false
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| <!-- <noscript></noscript> -->\n| <body>\n"
}, {
name: "tests16.dat #86"
html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
+ scripting: true
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| \"<!--\"\n| <body>\n| \"X\"\n| <noscript>\n| \"-->\"\n"
}, {
name: "tests16.dat #87"
html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
+ scripting: false
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| <!-- </noscript>X<noscript> -->\n| <body>\n"
}, {
name: "tests16.dat #88"
html: "<!doctype html><noscript><iframe></noscript>X"
+ scripting: true
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| \"<iframe>\"\n| <body>\n| \"X\"\n"
}, {
name: "tests16.dat #89"
html: "<!doctype html><noscript><iframe></noscript>X"
+ scripting: false
errors: 2
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| <body>\n| <iframe>\n| \"</noscript>X\"\n"
}, {
}, {
name: "tests16.dat #181"
html: "<noscript><!--<noscript></noscript>--></noscript>"
+ scripting: true
errors: 2
expected: "| <html>\n| <head>\n| <noscript>\n| \"<!--<noscript>\"\n| <body>\n| \"-->\"\n"
}, {
name: "tests16.dat #182"
html: "<noscript><!--<noscript></noscript>--></noscript>"
+ scripting: false
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| <!-- <noscript></noscript> -->\n| <body>\n"
}, {
name: "tests16.dat #183"
html: "<noscript><!--</noscript>X<noscript>--></noscript>"
+ scripting: true
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| \"<!--\"\n| <body>\n| \"X\"\n| <noscript>\n| \"-->\"\n"
}, {
name: "tests16.dat #184"
html: "<noscript><!--</noscript>X<noscript>--></noscript>"
+ scripting: false
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| <!-- </noscript>X<noscript> -->\n| <body>\n"
}, {
name: "tests16.dat #185"
html: "<noscript><iframe></noscript>X"
+ scripting: true
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| \"<iframe>\"\n| <body>\n| \"X\"\n"
}, {
name: "tests16.dat #186"
html: "<noscript><iframe></noscript>X"
+ scripting: false
errors: 3
expected: "| <html>\n| <head>\n| <noscript>\n| <body>\n| <iframe>\n| \"</noscript>X\"\n"
}, {
}, {
name: "tests5.dat #16"
html: "<noscript><!--</noscript>--></noscript>"
+ scripting: true
errors: 2
expected: "| <html>\n| <head>\n| <noscript>\n| \"<!--\"\n| <body>\n| \"-->\"\n"
}, {
name: "tests5.dat #17"
html: "<noscript><!--</noscript>--></noscript>"
+ scripting: false
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| <!-- </noscript> -->\n| <body>\n"
}, {