Sync with trunk
This commit is contained in:
commit
8cd38d9ade
29 changed files with 1310 additions and 733 deletions
4
test/fixtures/revisions.yml
vendored
4
test/fixtures/revisions.yml
vendored
|
@ -50,7 +50,7 @@ home_page_second_revision:
|
|||
updated_at: <%= Time.local(2004, 4, 4, 16, 50).to_formatted_s(:db) %>
|
||||
revised_at: <%= Time.local(2004, 4, 4, 16, 50).to_formatted_s(:db) %>
|
||||
page_id: 1
|
||||
content: HisWay would be MyWay in kinda ThatWay in HisWay though MyWay \OverThere -- see SmartEngine in that SmartEngineGUI
|
||||
content: HisWay would be MyWay $\sin(x)\begin{svg}<svg/>\end{svg}\includegraphics[width=3em]{foo}$ in kinda ThatWay in HisWay though MyWay \OverThere -- see SmartEngine in that SmartEngineGUI
|
||||
author: DavidHeinemeierHansson
|
||||
|
||||
first_page_first_revision:
|
||||
|
@ -59,7 +59,7 @@ first_page_first_revision:
|
|||
updated_at: <%= Time.local(2004, 4, 4, 16, 55).to_formatted_s(:db) %>
|
||||
revised_at: <%= Time.local(2004, 4, 4, 16, 55).to_formatted_s(:db) %>
|
||||
page_id: 6
|
||||
content: HisWay would be MyWay in kinda ThatWay in HisWay though MyWay \\OverThere -- see SmartEngine in that SmartEngineGUI
|
||||
content: HisWay would be MyWay $\sin(x)\begin{svg}<svg/>\end{svg}\includegraphics[width=3em]{foo}$ in kinda ThatWay in HisWay though MyWay \\OverThere -- see SmartEngine in that SmartEngineGUI
|
||||
author: DavidHeinemeierHansson
|
||||
|
||||
oak_first_revision:
|
||||
|
|
|
@ -702,7 +702,6 @@ class WikiControllerTest < Test::Unit::TestCase
|
|||
|
||||
% Because of conflicts, \space and \mathop are converted to
|
||||
% \itexspace and \operatorname during preprocessing.
|
||||
% \over is simply unsupported.
|
||||
|
||||
% itex: \space{ht}{dp}{wd}
|
||||
%
|
||||
|
@ -868,7 +867,7 @@ class WikiControllerTest < Test::Unit::TestCase
|
|||
|
||||
\section*{HomePage}
|
||||
|
||||
HisWay would be MyWay in kinda ThatWay in HisWay though MyWay $\backslash$OverThere --{} see SmartEngine in that SmartEngineGUI
|
||||
HisWay would be MyWay $\sin(x) \includegraphics[width=3em]{foo}$ in kinda ThatWay in HisWay though MyWay $\backslash$OverThere --{} see SmartEngine in that SmartEngineGUI
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,10 @@ class PageRendererTest < Test::Unit::TestCase
|
|||
|
||||
def test_content_with_wiki_links
|
||||
assert_equal '<p><span class="newWikiWord">His Way<a href="../show/HisWay">?</a></span> ' +
|
||||
'would be <a class="existingWikiWord" href="../show/MyWay">My Way</a> in kinda ' +
|
||||
'would be <a class="existingWikiWord" href="../show/MyWay">My Way</a> <span class="maruku-inline">' +
|
||||
'<math class="maruku-mathml" display="inline" xmlns="http://www.w3.org/1998/Math/MathML">' +
|
||||
'<mi>sin</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><semantics>' +
|
||||
'<annotation-xml encoding="SVG1.1"><svg></svg></annotation-xml></semantics></math></span> in kinda ' +
|
||||
'<a class="existingWikiWord" href="../show/ThatWay">That Way</a> in ' +
|
||||
'<span class="newWikiWord">His Way<a href="../show/HisWay">?</a></span> ' +
|
||||
%{though <a class="existingWikiWord" href="../show/MyWay">My Way</a> OverThere \xE2\x80\x93 see } +
|
||||
|
@ -54,7 +57,13 @@ class PageRendererTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_markdown
|
||||
set_web_property :markup, :markdown
|
||||
set_web_property :markup, :markdownMML
|
||||
|
||||
assert_markup_parsed_as(
|
||||
%{<p>equation <span class="maruku-inline"><math class="maruku-mathml" } +
|
||||
%{display="inline" xmlns="http://www.w3.org/1998/Math/MathML">} +
|
||||
%{<mi>sin</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></math></span></p>},
|
||||
"equation $\\sin(x)$")
|
||||
|
||||
assert_markup_parsed_as(
|
||||
%{<h1 id="my_headline">My Headline</h1>\n\n<p>that <span class="newWikiWord">} +
|
||||
|
@ -66,6 +75,14 @@ class PageRendererTest < Test::Unit::TestCase
|
|||
%{Smart Engine GUI<a href="../show/SmartEngineGUI">?</a></span></p>},
|
||||
"#My Headline#\n\nthat SmartEngineGUI")
|
||||
|
||||
assert_markup_parsed_as(
|
||||
%{<div class="maruku-equation"><math class="maruku-mathml" display="block" } +
|
||||
%{xmlns="http://www.w3.org/1998/Math/MathML"><mi>sin</mi><mo stretchy="false">} +
|
||||
%{(</mo><mi>x</mi><mo stretchy="false">)</mo><semantics><annotation-xml encoding="SVG1.1">} +
|
||||
%{<svg></svg></annotation-xml></semantics></math><div class="maruku-eq-tex"><code style="display: none;">} +
|
||||
%{\\sin(x) \\begin{svg}<svg></svg>\\end{svg}</code></div></div>},
|
||||
"$$\\sin(x) \\begin{svg}<svg/>\\end{svg}$$")
|
||||
|
||||
code_block = [
|
||||
'This is a code block:',
|
||||
'',
|
||||
|
@ -79,6 +96,27 @@ class PageRendererTest < Test::Unit::TestCase
|
|||
%{<p>This is a code block:</p>\n\n<pre><code>def a_method(arg)\n} +
|
||||
%{return ThatWay</code></pre>\n\n<p>Nice!</p>},
|
||||
code_block)
|
||||
|
||||
assert_markup_parsed_as(
|
||||
%{<p><span class="maruku-inline"><math class="maruku-mathml" } +
|
||||
%{display="inline" xmlns="http://www.w3.org/1998/Math/MathML">} +
|
||||
%{<mi>sin</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></math></span> ecuasi\303\263n</p>},
|
||||
"$\\sin(x)$ ecuasi\303\263n")
|
||||
|
||||
assert_markup_parsed_as(
|
||||
%{<p>ecuasi\303\263n</p>\n<div class="maruku-equation"><math class="maruku-mathml" } +
|
||||
%{display="block" xmlns="http://www.w3.org/1998/Math/MathML"><mi>sin</mi>} +
|
||||
%{<mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></math>} +
|
||||
%{<div class="maruku-eq-tex"><code style="display: none;">\\sin(x)</code></div></div>},
|
||||
"ecuasi\303\263n\n$$\\sin(x)$$")
|
||||
|
||||
#FIXME
|
||||
assert_markup_parsed_as(
|
||||
%{<p>ecuasi\303\263n <span class="maruku-inline"><math class="maruku-mathml" } +
|
||||
%{display="inline" xmlns="http://www.w3.org/1998/Math/MathML">} +
|
||||
%{<mi>sin</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></math></span></p>},
|
||||
"ecuasi\303\263n $\\sin(x)$")
|
||||
|
||||
end
|
||||
|
||||
def test_markdown_hyperlink_with_slash
|
||||
|
@ -251,7 +289,10 @@ class PageRendererTest < Test::Unit::TestCase
|
|||
|
||||
def test_content_for_export
|
||||
assert_equal '<p><span class="newWikiWord">His Way</span> would be ' +
|
||||
'<a class="existingWikiWord" href="MyWay.html">My Way</a> in kinda ' +
|
||||
'<a class="existingWikiWord" href="MyWay.html">My Way</a> <span class="maruku-inline">' +
|
||||
'<math class="maruku-mathml" display="inline" xmlns="http://www.w3.org/1998/Math/MathML">' +
|
||||
'<mi>sin</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><semantics>' +
|
||||
'<annotation-xml encoding="SVG1.1"><svg></svg></annotation-xml></semantics></math></span> in kinda ' +
|
||||
'<a class="existingWikiWord" href="ThatWay.html">That Way</a> in ' +
|
||||
'<span class="newWikiWord">His Way</span> though ' +
|
||||
%{<a class="existingWikiWord" href="MyWay.html">My Way</a> OverThere \xE2\x80\x93 see } +
|
||||
|
|
|
@ -117,6 +117,6 @@ class PageTest < Test::Unit::TestCase
|
|||
assert_equal 3, @page.revisions(true).length, "Should have three revisions"
|
||||
@page.current_revision(true)
|
||||
@page.rollback(0, Time.now, '127.0.0.1', test_renderer)
|
||||
assert_equal "HisWay would be MyWay in kinda ThatWay in HisWay though MyWay \\\\OverThere -- see SmartEngine in that SmartEngineGUI", @page.current_revision(true).content
|
||||
assert_equal "HisWay would be MyWay $\\sin(x)\\begin{svg}<svg/>\\end{svg}\\includegraphics[width=3em]{foo}$ in kinda ThatWay in HisWay though MyWay \\\\OverThere -- see SmartEngine in that SmartEngineGUI", @page.current_revision(true).content
|
||||
end
|
||||
end
|
||||
|
|
5
vendor/plugins/HTML5lib/History.txt
vendored
5
vendor/plugins/HTML5lib/History.txt
vendored
|
@ -1,3 +1,8 @@
|
|||
== 0.10.0 2007-10-08
|
||||
* proof-of-concept validator
|
||||
* easier to localize error reporting
|
||||
* many unit tests
|
||||
|
||||
== 0.1.0 / 2007-08-07
|
||||
|
||||
* 1 major enhancement
|
||||
|
|
5
vendor/plugins/HTML5lib/bin/html5
vendored
5
vendor/plugins/HTML5lib/bin/html5
vendored
|
@ -39,7 +39,7 @@ def parse(opts, args)
|
|||
if opts.parsemethod == :parse
|
||||
args = [f, encoding]
|
||||
else
|
||||
args = [f, 'div', encoding]
|
||||
args = [f, (opts.container || 'div'), encoding]
|
||||
end
|
||||
|
||||
if opts.profile
|
||||
|
@ -113,8 +113,9 @@ opts = OptionParser.new do |opts|
|
|||
options.treebuilder = treebuilder
|
||||
end
|
||||
|
||||
opts.on("-f", "--fragment", "Parse as a fragment") do |parse|
|
||||
opts.on("-f", "--fragment CONTAINER", "Parse as a fragment") do |container|
|
||||
options.parsemethod = :parse_fragment
|
||||
options.container = container if container
|
||||
end
|
||||
|
||||
opts.separator ""
|
||||
|
|
13
vendor/plugins/HTML5lib/lib/core_ext/kernel.rb
vendored
Normal file
13
vendor/plugins/HTML5lib/lib/core_ext/kernel.rb
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
module Kernel
|
||||
def silence
|
||||
if $VERBOSE
|
||||
$VERBOSE = false
|
||||
yield
|
||||
$VERBOSE = true
|
||||
else
|
||||
yield
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -999,7 +999,7 @@ module HTML5
|
|||
_("Unexpected select start tag in the select phase " +
|
||||
"implies select start tag."),
|
||||
"unexpected-start-tag-in-select" =>
|
||||
_("Unexpected start tag token (%(name) in the select phase. " +
|
||||
_("Unexpected start tag token (%(name)) in the select phase. " +
|
||||
"Ignored."),
|
||||
"unexpected-end-tag-in-select" =>
|
||||
_("Unexpected end tag (%(name)) in the select phase. Ignored."),
|
||||
|
@ -1039,6 +1039,8 @@ module HTML5
|
|||
"expected-eof-but-got-end-tag" =>
|
||||
_("Unexpected end tag (%(name))" +
|
||||
". Expected end of file."),
|
||||
"unexpected-end-table-in-caption" =>
|
||||
_("Unexpected end table tag in caption. Generates implied end caption.")
|
||||
}
|
||||
|
||||
end
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
require 'html5/html5parser/phase'
|
||||
require 'core_ext/kernel'
|
||||
|
||||
module HTML5
|
||||
class InBodyPhase < Phase
|
||||
|
@ -50,13 +51,12 @@ module HTML5
|
|||
super(parser, tree)
|
||||
|
||||
# for special handling of whitespace in <pre>
|
||||
@processSpaceCharactersDropNewline = false
|
||||
if $-w
|
||||
$-w = false
|
||||
alias processSpaceCharactersNonPre processSpaceCharacters
|
||||
class << self; alias processSpaceCharactersNonPre processSpaceCharacters; end
|
||||
$-w = true
|
||||
else
|
||||
alias processSpaceCharactersNonPre processSpaceCharacters
|
||||
class << self; alias processSpaceCharactersNonPre processSpaceCharacters; end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -65,10 +65,18 @@ module HTML5
|
|||
|
||||
if $-w
|
||||
$-w = false
|
||||
alias processSpaceCharacters processSpaceCharactersNonPre
|
||||
class << self
|
||||
silence do
|
||||
alias processSpaceCharacters processSpaceCharactersNonPre
|
||||
end
|
||||
end
|
||||
$-w = true
|
||||
else
|
||||
alias processSpaceCharacters processSpaceCharactersNonPre
|
||||
class << self
|
||||
silence do
|
||||
alias processSpaceCharacters processSpaceCharactersNonPre
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (data.length > 0 and data[0] == ?\n &&
|
||||
|
@ -121,7 +129,13 @@ module HTML5
|
|||
def startTagCloseP(name, attributes)
|
||||
endTagP('p') if in_scope?('p')
|
||||
@tree.insert_element(name, attributes)
|
||||
@processSpaceCharactersDropNewline = true if name == 'pre'
|
||||
if name == 'pre'
|
||||
class << self
|
||||
silence do
|
||||
alias processSpaceCharacters processSpaceCharactersDropNewline
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def startTagForm(name, attributes)
|
||||
|
@ -291,8 +305,7 @@ module HTML5
|
|||
# XXX Form element pointer checking here as well...
|
||||
@tree.insert_element(name, attributes)
|
||||
@parser.tokenizer.content_model_flag = :RCDATA
|
||||
@processSpaceCharactersDropNewline = true
|
||||
alias processSpaceCharacters processSpaceCharactersDropNewline
|
||||
class << self; alias processSpaceCharacters processSpaceCharactersDropNewline; end
|
||||
end
|
||||
|
||||
# iframe, noembed noframes, noscript(if scripting enabled)
|
||||
|
@ -344,9 +357,9 @@ module HTML5
|
|||
# XXX Need to take open <p> tags into account here. We shouldn't imply
|
||||
# </p> but we should not throw a parse error either. Specification is
|
||||
# likely to be updated.
|
||||
unless @tree.open_elements[1].name == 'body'
|
||||
unless @tree.open_elements[1] && @tree.open_elements[1].name == 'body'
|
||||
# inner_html case
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {:name => 'body'}
|
||||
return
|
||||
end
|
||||
unless @tree.open_elements.last.name == 'body'
|
||||
|
@ -364,7 +377,14 @@ module HTML5
|
|||
|
||||
def endTagBlock(name)
|
||||
#Put us back in the right whitespace handling mode
|
||||
@processSpaceCharactersDropNewline = false if name == 'pre'
|
||||
if name == 'pre'
|
||||
class << self;
|
||||
silence do
|
||||
alias processSpaceCharacters processSpaceCharactersNonPre;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@tree.generateImpliedEndTags if in_scope?(name)
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ module HTML5
|
|||
|
||||
# http://www.whatwg.org/specs/web-apps/current-work/#in-caption
|
||||
|
||||
handle_start 'html', %w( caption col colgroup tbody td tfoot th thead tr ) => 'TableElement'
|
||||
handle_start 'html', %w(caption col colgroup tbody td tfoot th thead tr) => 'TableElement'
|
||||
|
||||
handle_end 'caption', 'table', %w( body col colgroup html tbody td tfoot th thead tr ) => 'Ignore'
|
||||
handle_end 'caption', 'table', %w(body col colgroup html tbody td tfoot th thead tr) => 'Ignore'
|
||||
|
||||
def ignoreEndTagCaption
|
||||
!in_scope?('caption', true)
|
||||
|
@ -18,7 +18,7 @@ module HTML5
|
|||
end
|
||||
|
||||
def startTagTableElement(name, attributes)
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {"name" => name}
|
||||
#XXX Have to duplicate logic here to find out if the tag is ignored
|
||||
ignoreEndTag = ignoreEndTagCaption
|
||||
@parser.phase.processEndTag('caption')
|
||||
|
@ -33,7 +33,7 @@ module HTML5
|
|||
if ignoreEndTagCaption
|
||||
# inner_html case
|
||||
assert @parser.inner_html
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {"name" => name}
|
||||
else
|
||||
# AT this code is quite similar to endTagTable in "InTable"
|
||||
@tree.generateImpliedEndTags
|
||||
|
@ -41,7 +41,7 @@ module HTML5
|
|||
unless @tree.open_elements[-1].name == 'caption'
|
||||
parse_error("expected-one-end-tag-but-got-another",
|
||||
{"gotName" => "caption",
|
||||
"expectedNmae" => @tree.open_elements.last.name})
|
||||
"expectedName" => @tree.open_elements.last.name})
|
||||
end
|
||||
|
||||
remove_open_elements_until('caption')
|
||||
|
@ -52,7 +52,7 @@ module HTML5
|
|||
end
|
||||
|
||||
def endTagTable(name)
|
||||
parse_error
|
||||
parse_error "unexpected-end-table-in-caption"
|
||||
ignoreEndTag = ignoreEndTagCaption
|
||||
@parser.phase.processEndTag('caption')
|
||||
@parser.phase.processEndTag(name) unless ignoreEndTag
|
||||
|
@ -65,6 +65,5 @@ module HTML5
|
|||
def endTagOther(name)
|
||||
@parser.phases[:inBody].processEndTag(name)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -56,7 +56,7 @@ module HTML5
|
|||
@parser.phase.processEndTag(name)
|
||||
else
|
||||
# sometimes inner_html case
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {:name => name}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ module HTML5
|
|||
if ignoreEndTagColgroup
|
||||
# inner_html case
|
||||
assert @parser.inner_html
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {:name => name}
|
||||
else
|
||||
@tree.open_elements.pop
|
||||
@parser.phase = @parser.phases[:inTable]
|
||||
|
|
|
@ -27,8 +27,7 @@ module HTML5
|
|||
end
|
||||
|
||||
def startTagOther(name, attributes)
|
||||
parse_error("unexpected-start-tag-in-frameset",
|
||||
{"name" => name})
|
||||
parse_error("unexpected-start-tag-in-frameset", {"name" => name})
|
||||
end
|
||||
|
||||
def endTagFrameset(name)
|
||||
|
|
|
@ -35,7 +35,7 @@ module HTML5
|
|||
if ignoreEndTagTr
|
||||
# inner_html case
|
||||
assert @parser.inner_html
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {:name => name}
|
||||
else
|
||||
clearStackToTableRowContext
|
||||
@tree.open_elements.pop
|
||||
|
@ -57,7 +57,7 @@ module HTML5
|
|||
@parser.phase.processEndTag(name)
|
||||
else
|
||||
# inner_html case
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {:name => name}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -75,8 +75,7 @@ module HTML5
|
|||
# XXX unify this with other table helper methods
|
||||
def clearStackToTableRowContext
|
||||
until %w[tr html].include?(name = @tree.open_elements.last.name)
|
||||
parse_error("unexpected-implied-end-tag-in-table-row",
|
||||
{"name" => @tree.open_elements.last.name})
|
||||
parse_error("unexpected-implied-end-tag-in-table-row", {"name" => @tree.open_elements.last.name})
|
||||
@tree.open_elements.pop
|
||||
end
|
||||
end
|
||||
|
|
|
@ -33,7 +33,7 @@ module HTML5
|
|||
@parser.phase.processStartTag(name, attributes)
|
||||
else
|
||||
# inner_html case
|
||||
parse_error
|
||||
parse_error "unexpected-start-tag", {:name => name}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -47,8 +47,7 @@ module HTML5
|
|||
@tree.open_elements.pop
|
||||
@parser.phase = @parser.phases[:inTable]
|
||||
else
|
||||
parse_error("unexpected-end-tag-in-table-body",
|
||||
{"name" => name})
|
||||
parse_error("unexpected-end-tag-in-table-body", {"name" => name})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -59,13 +58,12 @@ module HTML5
|
|||
@parser.phase.processEndTag(name)
|
||||
else
|
||||
# inner_html case
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {:name => name}
|
||||
end
|
||||
end
|
||||
|
||||
def endTagIgnore(name)
|
||||
parse_error("unexpected-end-tag-in-table-body",
|
||||
{"name" => name})
|
||||
parse_error("unexpected-end-tag-in-table-body", {"name" => name})
|
||||
end
|
||||
|
||||
def endTagOther(name)
|
||||
|
|
|
@ -82,7 +82,7 @@ module HTML5
|
|||
else
|
||||
# inner_html case
|
||||
assert @parser.inner_html
|
||||
parse_error
|
||||
parse_error "unexpected-end-tag", {:name => name}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
28
vendor/plugins/HTML5lib/lib/html5/inputstream.rb
vendored
28
vendor/plugins/HTML5lib/lib/html5/inputstream.rb
vendored
|
@ -47,7 +47,7 @@ module HTML5
|
|||
|
||||
#Encoding to use if no other information can be found
|
||||
@DEFAULT_ENCODING = 'windows-1252'
|
||||
|
||||
|
||||
#Detect encoding iff no explicit "transport level" encoding is supplied
|
||||
if @encoding.nil? or not HTML5.is_valid_encoding(@encoding)
|
||||
@char_encoding = detect_encoding
|
||||
|
@ -235,14 +235,16 @@ module HTML5
|
|||
# Returns (line, col) of the current position in the stream.
|
||||
def position
|
||||
line, col = @line, @col
|
||||
@queue.reverse.each do |c|
|
||||
if c == "\n"
|
||||
line -= 1
|
||||
raise RuntimeError.new("col=#{col}") unless col == 0
|
||||
col = @line_lengths[line]
|
||||
else
|
||||
col -= 1
|
||||
end
|
||||
if @queue and @queue.last != :EOF
|
||||
@queue.reverse.each do |c|
|
||||
if c == "\n"
|
||||
line -= 1
|
||||
raise RuntimeError.new("col=#{col}") unless col == 0
|
||||
col = @line_lengths[line]
|
||||
else
|
||||
col -= 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return [line + 1, col]
|
||||
end
|
||||
|
@ -434,7 +436,13 @@ module HTML5
|
|||
end
|
||||
break unless keep_parsing
|
||||
end
|
||||
@encoding = @encoding.strip unless @encoding.nil?
|
||||
unless @encoding.nil?
|
||||
@encoding = @encoding.strip
|
||||
if ["UTF-16", "UTF-16BE", "UTF-16LE", "UTF-32", "UTF-32BE", "UTF-32LE"].include?(@encoding.upcase)
|
||||
@encoding = 'utf-8'
|
||||
end
|
||||
end
|
||||
|
||||
return @encoding
|
||||
end
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ module HTML5
|
|||
|
||||
SVG_ELEMENTS = %w[a animate animateColor animateMotion animateTransform
|
||||
circle defs desc ellipse font-face font-face-name font-face-src g
|
||||
glyph hkern image linearGradient line marker metadata missing-glyph
|
||||
glyph hkern linearGradient line marker metadata missing-glyph
|
||||
mpath path polygon polyline radialGradient rect set stop svg switch
|
||||
text title tspan use]
|
||||
|
||||
|
@ -78,6 +78,9 @@ module HTML5
|
|||
|
||||
ATTR_VAL_IS_URI = %w[href src cite action longdesc xlink:href xml:base]
|
||||
|
||||
SVG_ATTR_VAL_ALLOWS_REF = %w[clip-path fill filter marker marker-start
|
||||
marker-mid marker-end mask stroke textpath]
|
||||
|
||||
ACCEPTABLE_CSS_PROPERTIES = %w[azimuth background-color
|
||||
border-bottom-color border-collapse border-color border-left-color
|
||||
border-right-color border-top-color clear color cursor direction
|
||||
|
@ -121,6 +124,9 @@ module HTML5
|
|||
attrs.delete attr
|
||||
end
|
||||
end
|
||||
SVG_ATTR_VAL_ALLOWS_REF.each do |attr|
|
||||
attrs[attr] = attrs[attr].to_s.gsub(/url\s*\(\s*[^#\s][^)]+?\)/m, ' ') if attrs[attr]
|
||||
end
|
||||
if attrs['style']
|
||||
attrs['style'] = sanitize_css(attrs['style'])
|
||||
end
|
||||
|
|
|
@ -144,7 +144,7 @@ module HTML5
|
|||
|
||||
elsif type == :Comment
|
||||
data = token[:data]
|
||||
serialize_error(_("Comment contains --")) if data.index("--")
|
||||
serialize_error("Comment contains --") if data.index("--")
|
||||
comment = "<!--%s-->" % token[:data]
|
||||
result << comment
|
||||
|
||||
|
|
2
vendor/plugins/HTML5lib/lib/html5/version.rb
vendored
2
vendor/plugins/HTML5lib/lib/html5/version.rb
vendored
|
@ -1,3 +1,3 @@
|
|||
module HTML5
|
||||
VERSION = '0.1.0'
|
||||
VERSION = '0.10.0'
|
||||
end
|
|
@ -79,3 +79,36 @@ windows-1252
|
|||
<meta content = "text/html;
|
||||
#encoding
|
||||
windows-1252
|
||||
|
||||
#data
|
||||
<meta charset="UTF-16">
|
||||
#encoding
|
||||
utf-8
|
||||
|
||||
#data
|
||||
<meta charset="UTF-16LE">
|
||||
#encoding
|
||||
utf-8
|
||||
|
||||
#data
|
||||
<meta charset="UTF-16BE">
|
||||
#encoding
|
||||
utf-8
|
||||
|
||||
#data
|
||||
<html a=ñ>
|
||||
<meta charset="utf-8">
|
||||
#encoding
|
||||
utf-8
|
||||
|
||||
#data
|
||||
<html ñ>
|
||||
<meta charset="utf-8">
|
||||
#encoding
|
||||
utf-8
|
||||
|
||||
#data
|
||||
<html>ñ
|
||||
<meta charset="utf-8">
|
||||
#encoding
|
||||
utf-8
|
||||
|
|
|
@ -412,5 +412,44 @@
|
|||
"input": "<img src='foo' title='\"foo\" bar' />",
|
||||
"rexml": "<img src='foo' title='\"foo\" bar' />",
|
||||
"output": "<img title='"foo" bar' src='foo'/>"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "uri_refs_in_svg_attributes",
|
||||
"input": "<rect fill='url(#foo)' />",
|
||||
"rexml": "<rect fill='url(#foo)'></rect>",
|
||||
"xhtml": "<rect fill='url(#foo)'></rect>",
|
||||
"output": "<rect fill='url(#foo)'/>"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "absolute_uri_refs_in_svg_attributes",
|
||||
"input": "<rect fill='url(http://bad.com/) #fff' />",
|
||||
"rexml": "<rect fill=' #fff'></rect>",
|
||||
"xhtml": "<rect fill=' #fff'></rect>",
|
||||
"output": "<rect fill=' #fff'/>"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "uri_ref_with_space_in svg_attribute",
|
||||
"input": "<rect fill='url(\n#foo)' />",
|
||||
"rexml": "<rect fill=\'url(\n#foo)\'></rect>",
|
||||
"xhtml": "<rect fill=\'url(\n#foo)\'></rect>",
|
||||
"output": "<rect fill=\'url(\n#foo)\'/>"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "absolute_uri_ref_with_space_in svg_attribute",
|
||||
"input": "<rect fill=\"url(\nhttp://bad.com/)\" />",
|
||||
"rexml": "<rect fill=' '></rect>",
|
||||
"xhtml": "<rect fill=' '></rect>",
|
||||
"output": "<rect fill=' '/>"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "allow_html5_image_tag",
|
||||
"input": "<image src='foo' />",
|
||||
"rexml": "<image src=\"foo\"></image>",
|
||||
"output": "<image src=\"foo\"/>"
|
||||
}
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -11,8 +11,8 @@
|
|||
#data
|
||||
<textarea>test</div>test
|
||||
#errors
|
||||
10: missing document type declaration.
|
||||
25: unexpected end of file while parsing CDATA section for element textarea.
|
||||
Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
|
||||
Line: 1 Col: 24 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -23,9 +23,9 @@
|
|||
#data
|
||||
<table><td>
|
||||
#errors
|
||||
7: missing document type declaration.
|
||||
11: required tr element start tag implied by unexpected td element start tag.
|
||||
12: unexpected end of file implied table element end tag.
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase.
|
||||
Line: 1 Col: 11 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -38,8 +38,8 @@
|
|||
#data
|
||||
<table><td>test</tbody></table>
|
||||
#errors
|
||||
missing document type declarattion
|
||||
Unexpected and of file
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -53,8 +53,8 @@ Unexpected and of file
|
|||
#data
|
||||
<frame>test
|
||||
#errors
|
||||
missing document type declaration
|
||||
frame element can't occur here
|
||||
Line: 1 Col: 7 Unexpected start tag (frame). Expected DOCTYPE.
|
||||
Line: 1 Col: 7 Unexpected start tag frame. Ignored.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -64,8 +64,8 @@ frame element can't occur here
|
|||
#data
|
||||
<!DOCTYPE HTML><frameset>test
|
||||
#errors
|
||||
frameset can't contain text
|
||||
Unexpected end of file
|
||||
Line: 1 Col: 29 Unepxected characters in the frameset phase. Characters ignored.
|
||||
Line: 1 Col: 29 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -75,8 +75,8 @@ Unexpected end of file
|
|||
#data
|
||||
<!DOCTYPE HTML><frameset><!DOCTYPE HTML>
|
||||
#errors
|
||||
document type declaration can only occur at the start of a document
|
||||
Expected end tag </frameset>
|
||||
Line: 1 Col: 40 Unexpected DOCTYPE. Ignored.
|
||||
Line: 1 Col: 40 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -86,8 +86,8 @@ Expected end tag </frameset>
|
|||
#data
|
||||
<!DOCTYPE HTML><font><p><b>test</font>
|
||||
#errors
|
||||
AAA violation. </font>
|
||||
AAA violation. </font>
|
||||
Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm.
|
||||
Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -102,7 +102,7 @@ AAA violation. </font>
|
|||
#data
|
||||
<!DOCTYPE HTML><dt><div><dd>
|
||||
#errors
|
||||
Missing end tag for <div>.
|
||||
Line: 1 Col: 28 Missing end tag (div, dt).
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -115,8 +115,8 @@ Missing end tag for <div>.
|
|||
#data
|
||||
<script></x
|
||||
#errors
|
||||
no document type
|
||||
Unexpected end of file. Expected </script> end tag.
|
||||
Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
|
||||
Line: 1 Col: 11 Unexpected end of file. Expected end tag (script).
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -127,11 +127,11 @@ Unexpected end of file. Expected </script> end tag.
|
|||
#data
|
||||
<table><plaintext><td>
|
||||
#errors
|
||||
no document type
|
||||
<plaintext> directly inside table
|
||||
Characters inside table.
|
||||
Characters inside table. (XXX?)
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 18 Unexpected start tag (plaintext) in table context caused voodoo mode.
|
||||
Line: 1 Col: 21 Unexpected non-space characters in table context caused voodoo mode.
|
||||
Line: 1 Col: 22 Unexpected non-space characters in table context caused voodoo mode.
|
||||
Line: 1 Col: 22 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -143,8 +143,8 @@ Unexpected end of file.
|
|||
#data
|
||||
<plaintext></plaintext>
|
||||
#errors
|
||||
No DOCTYPE seen.
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 11 Unexpected start tag (plaintext). Expected DOCTYPE.
|
||||
Line: 1 Col: 23 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -155,8 +155,8 @@ Unexpected end of file.
|
|||
#data
|
||||
<!DOCTYPE HTML><table><tr>TEST
|
||||
#errors
|
||||
TEST can't occur in <tr>
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 30 Unexpected non-space characters in table context caused voodoo mode.
|
||||
Line: 1 Col: 30 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -170,8 +170,8 @@ Unexpected end of file.
|
|||
#data
|
||||
<!DOCTYPE HTML><body t1=1><body t2=2><body t3=3 t4=4>
|
||||
#errors
|
||||
Unexpected start tag "body"
|
||||
Unexpected start tag "body"
|
||||
Line: 1 Col: 37 Unexpected start tag (body).
|
||||
Line: 1 Col: 53 Unexpected start tag (body).
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -185,10 +185,10 @@ Unexpected start tag "body"
|
|||
#data
|
||||
</b test
|
||||
#errors
|
||||
Unexpected EOF in attribute
|
||||
Unexpected attribute in end tag.
|
||||
No doctype.
|
||||
Unexpected end tag.
|
||||
Line: 1 Col: 8 Unexpected end of file in attribute name.
|
||||
Line: 1 Col: 8 End tag contains unexpected attributes.
|
||||
Line: 1 Col: 8 Unexpected end tag (b). Expected DOCTYPE.
|
||||
Line: 1 Col: 8 Unexpected end tag (b) after the (implied) root element.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -197,9 +197,9 @@ Unexpected end tag.
|
|||
#data
|
||||
<!DOCTYPE HTML></b test<b &=&>X
|
||||
#errors
|
||||
End tag contains attributes.
|
||||
Unexpected end tag.
|
||||
Named entity didn't end with ;
|
||||
Line: 1 Col: 32 Named entity didn't end with ';'.
|
||||
Line: 1 Col: 33 End tag contains unexpected attributes.
|
||||
Line: 1 Col: 33 Unexpected end tag (b) after the (implied) root element.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -210,8 +210,8 @@ Named entity didn't end with ;
|
|||
#data
|
||||
<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt
|
||||
#errors
|
||||
No space after literal DOCTYPE.
|
||||
Unexpected EOF in (end) tag name
|
||||
Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
|
||||
Line: 1 Col: 54 Unexpected end of file in the tag name.
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
|
@ -224,7 +224,7 @@ Unexpected EOF in (end) tag name
|
|||
#data
|
||||
&
|
||||
#errors
|
||||
No doctype.
|
||||
Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -234,8 +234,8 @@ No doctype.
|
|||
#data
|
||||
&#
|
||||
#errors
|
||||
No doctype.
|
||||
Unfinished numeric entity.
|
||||
Line: 1 Col: 1 Numeric entity expected. Got end of file instead.
|
||||
Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -245,8 +245,8 @@ Unfinished numeric entity.
|
|||
#data
|
||||
&#X
|
||||
#errors
|
||||
No doctype.
|
||||
Unfinished hexadecimal entity.
|
||||
Line: 1 Col: 3 Numeric entity expected but none found.
|
||||
Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -256,8 +256,8 @@ Unfinished hexadecimal entity.
|
|||
#data
|
||||
&#x
|
||||
#errors
|
||||
No doctype.
|
||||
Unfinished hexadecimal entity.
|
||||
Line: 1 Col: 3 Numeric entity expected but none found.
|
||||
Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -267,8 +267,8 @@ Unfinished hexadecimal entity.
|
|||
#data
|
||||
-
|
||||
#errors
|
||||
No doctype.
|
||||
Numeric entity didn't end with ;
|
||||
Line: 1 Col: 4 Numeric entity didn't end with ';'.
|
||||
Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -278,8 +278,8 @@ Numeric entity didn't end with ;
|
|||
#data
|
||||
&x-test
|
||||
#errors
|
||||
No doctype.
|
||||
Unfinished named entity.
|
||||
Line: 1 Col: 1 Named entity expected. Got none.
|
||||
Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -289,7 +289,7 @@ Unfinished named entity.
|
|||
#data
|
||||
<!doctypehtml><p><li>
|
||||
#errors
|
||||
No space after literal DOCTYPE.
|
||||
Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
|
@ -301,7 +301,7 @@ No space after literal DOCTYPE.
|
|||
#data
|
||||
<!doctypeHTML><p><dt>
|
||||
#errors
|
||||
No space after literal DOCTYPE.
|
||||
Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -313,7 +313,7 @@ No space after literal DOCTYPE.
|
|||
#data
|
||||
<!doctypehtmL><p><dd>
|
||||
#errors
|
||||
No space after literal DOCTYPE.
|
||||
Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
|
||||
#document
|
||||
| <!DOCTYPE htmL>
|
||||
| <html>
|
||||
|
@ -325,8 +325,8 @@ No space after literal DOCTYPE.
|
|||
#data
|
||||
<!doctypehtml><p><form>
|
||||
#errors
|
||||
No space after literal DOCTYPE.
|
||||
Unexpected EOF.
|
||||
Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
|
||||
Line: 1 Col: 23 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
|
@ -338,8 +338,8 @@ Unexpected EOF.
|
|||
#data
|
||||
<!DOCTYPE HTML><p><b><i><u></p> <p>X
|
||||
#errors
|
||||
Unexpected end tag </p>.
|
||||
Unexpected end EOF. Missing closing tags.
|
||||
Line: 1 Col: 31 Unexpected end tag (p). Ignored.
|
||||
Line: 1 Col: 36 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -370,8 +370,8 @@ Unexpected end EOF. Missing closing tags.
|
|||
#data
|
||||
&
|
||||
#errors
|
||||
No doctype.
|
||||
No closing ; for the entity.
|
||||
Line: 1 Col: 4 Named entity didn't end with ';'.
|
||||
Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -381,8 +381,8 @@ No closing ; for the entity.
|
|||
#data
|
||||
&AMp;
|
||||
#errors
|
||||
No doctype.
|
||||
Invalid entity.
|
||||
Line: 1 Col: 1 Named entity expected. Got none.
|
||||
Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -392,7 +392,7 @@ Invalid entity.
|
|||
#data
|
||||
<!DOCTYPE HTML><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY>
|
||||
#errors
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 110 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -403,7 +403,7 @@ Unexpected end of file.
|
|||
#data
|
||||
<!DOCTYPE HTML>X</body>X
|
||||
#errors
|
||||
Unexpected non-space characters in the after body phase.
|
||||
Line: 1 Col: 24 Unexpected non-space characters in the after body phase.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -414,7 +414,7 @@ Unexpected non-space characters in the after body phase.
|
|||
#data
|
||||
<!DOCTYPE HTML><!-- X
|
||||
#errors
|
||||
Unexpected end of file in comment.
|
||||
Line: 1 Col: 21 Unexpected end of file in comment.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <!-- X -->
|
||||
|
@ -425,8 +425,8 @@ Unexpected end of file in comment.
|
|||
#data
|
||||
<!DOCTYPE HTML><table><caption>test TEST</caption><td>test
|
||||
#errors
|
||||
Unexpected <td> in table body phase.
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 54 Unexpected table cell start tag (td) in the table body phase.
|
||||
Line: 1 Col: 58 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -443,7 +443,7 @@ Unexpected end of file.
|
|||
#data
|
||||
<!DOCTYPE HTML><select><option><optgroup>
|
||||
#errors
|
||||
Unexpected end of file. Missing closing tags.
|
||||
Line: 1 Col: 41 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -456,8 +456,8 @@ Unexpected end of file. Missing closing tags.
|
|||
#data
|
||||
<!DOCTYPE HTML><select><optgroup><option></optgroup><option><select><option>
|
||||
#errors
|
||||
Unexpected start tag <select> in <select>.
|
||||
Unexpected start tag <option>.
|
||||
Line: 1 Col: 68 Unexpected select start tag in the select phase implies select start tag.
|
||||
Line: 1 Col: 76 Unexpected start tag option. Ignored.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -471,7 +471,7 @@ Unexpected start tag <option>.
|
|||
#data
|
||||
<!DOCTYPE HTML><select><optgroup><option><optgroup>
|
||||
#errors
|
||||
Unexpected end of file. Missing closing tags.
|
||||
Line: 1 Col: 51 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -507,7 +507,7 @@ Unexpected end of file. Missing closing tags.
|
|||
#data
|
||||
<!DOCTYPE HTML><!-- XXX - XXX
|
||||
#errors
|
||||
Unexpected EOF in comment.
|
||||
Line: 1 Col: 29 Unexpected end of file in comment (-)
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <!-- XXX - XXX -->
|
||||
|
@ -528,8 +528,8 @@ Unexpected EOF in comment.
|
|||
#data
|
||||
<isindex test=x name=x>
|
||||
#errors
|
||||
No doctype
|
||||
<isindex> is not ok!
|
||||
Line: 1 Col: 23 Unexpected start tag (isindex). Expected DOCTYPE.
|
||||
Line: 1 Col: 23 Unexpected start tag isindex. Don't use it!
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -548,7 +548,7 @@ No doctype
|
|||
test
|
||||
test
|
||||
#errors
|
||||
No doctype
|
||||
Line: 2 Col: 4 Unexpected non-space characters. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -560,9 +560,9 @@ test"
|
|||
<p><b><i><u></p>
|
||||
<p>X
|
||||
#errors
|
||||
No doctype
|
||||
Unexpected end tag p.
|
||||
Unexpected EOF.
|
||||
Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE.
|
||||
Line: 1 Col: 16 Unexpected end tag (p). Ignored.
|
||||
Line: 2 Col: 4 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -582,7 +582,7 @@ Unexpected EOF.
|
|||
#data
|
||||
<!DOCTYPE HTML><body><title>test</body></title>
|
||||
#errors
|
||||
Unexpected start tag that belongs in the head.
|
||||
Line: 1 Col: 28 Unexpected start tag (title) that can be in head. Moved.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -595,7 +595,7 @@ Unexpected start tag that belongs in the head.
|
|||
<!DOCTYPE HTML><body><title>X</title><meta name=z><link rel=foo><style>
|
||||
x { content:"</style" } </style>
|
||||
#errors
|
||||
Unexpected start tag that belongs in head. <title>
|
||||
Line: 1 Col: 28 Unexpected start tag (title) that can be in head. Moved.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -626,7 +626,7 @@ x { content:"</style" } "
|
|||
|
||||
|
||||
#errors
|
||||
No doctype.
|
||||
Line: 2 Col: 1 Unexpected End of file. Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -661,7 +661,7 @@ No doctype.
|
|||
#data
|
||||
<!DOCTYPE HTML><html><body><html id=x>
|
||||
#errors
|
||||
duplicate html start tag
|
||||
Line: 1 Col: 38 html needs to be the first start tag.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -672,8 +672,8 @@ duplicate html start tag
|
|||
#data
|
||||
<!DOCTYPE HTML>X</body><html id="x">
|
||||
#errors
|
||||
Unexpected html start tag in the after body phase.
|
||||
html needs to be the first start tag.
|
||||
Line: 1 Col: 36 Unexpected start tag token (html) in the after body phase.
|
||||
Line: 1 Col: 36 html needs to be the first start tag.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -685,7 +685,7 @@ html needs to be the first start tag.
|
|||
#data
|
||||
<!DOCTYPE HTML><head><html id=x>
|
||||
#errors
|
||||
html start tag too late
|
||||
Line: 1 Col: 32 html needs to be the first start tag.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -696,8 +696,8 @@ html start tag too late
|
|||
#data
|
||||
<!DOCTYPE HTML>X</html>X
|
||||
#errors
|
||||
Unexpected non-space characters. Expected end of file.
|
||||
Unexpected non-space characters in after body phase. Expected end of file.
|
||||
Line: 1 Col: 24 Unexpected non-space characters. Expected end of file.
|
||||
Line: 1 Col: 24 Unexpected non-space characters in the after body phase.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -718,8 +718,8 @@ Unexpected non-space characters in after body phase. Expected end of file.
|
|||
#data
|
||||
<!DOCTYPE HTML>X</html><p>X
|
||||
#errors
|
||||
Unexpected start tag <p> in trailing end phase.
|
||||
Unexpected start tag <p> in after body phase.
|
||||
Line: 1 Col: 26 Unexpected start tag (p). Expected end of file.
|
||||
Line: 1 Col: 26 Unexpected start tag token (p) in the after body phase.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -732,9 +732,9 @@ Unexpected start tag <p> in after body phase.
|
|||
#data
|
||||
<!DOCTYPE HTML>X<p/x/y/z>
|
||||
#errors
|
||||
Solidus (/) incorrectly placed.
|
||||
Solidus (/) incorrectly placed.
|
||||
Solidus (/) incorrectly placed.
|
||||
Line: 1 Col: 19 Solidus (/) incorrectly placed in tag.
|
||||
Line: 1 Col: 21 Solidus (/) incorrectly placed in tag.
|
||||
Line: 1 Col: 23 Solidus (/) incorrectly placed in tag.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
@ -749,7 +749,7 @@ Solidus (/) incorrectly placed.
|
|||
#data
|
||||
<!DOCTYPE HTML><!--x--
|
||||
#errors
|
||||
Unexpected end of file in comment.
|
||||
Line: 1 Col: 22 Unexpected end of file in comment (--).
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <!-- x -->
|
||||
|
@ -760,7 +760,7 @@ Unexpected end of file in comment.
|
|||
#data
|
||||
<!DOCTYPE HTML><table><tr><td></p></table>
|
||||
#errors
|
||||
Unexpected </p> end tag.
|
||||
Line: 1 Col: 34 Unexpected end tag (p). Ignored.
|
||||
#document
|
||||
| <!DOCTYPE HTML>
|
||||
| <html>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#data
|
||||
<head></head><style></style>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
<style> in after-head mode
|
||||
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
|
||||
Line: 1 Col: 20 Unexpected start tag (style) that can be in head. Moved.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -12,8 +12,8 @@ No DOCTYPE
|
|||
#data
|
||||
<head></head><script></script>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
<script> in after-head mode
|
||||
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
|
||||
Line: 1 Col: 21 Unexpected start tag (script) that can be in head. Moved.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -23,8 +23,8 @@ No DOCTYPE
|
|||
#data
|
||||
<head></head><!-- --><style></style><!-- --><script></script>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
<style> in after-head mode
|
||||
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
|
||||
Line: 1 Col: 28 Unexpected start tag (style) that can be in head. Moved.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -37,7 +37,7 @@ No DOCTYPE
|
|||
#data
|
||||
<head></head><!-- -->x<style></style><!-- --><script></script>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -131,7 +131,7 @@ y"
|
|||
<!DOCTYPE htML><html><head></head><body><pre>x<div>
|
||||
y</pre></body></html>
|
||||
#errors
|
||||
End tag <pre> seen too early. Expected other end tag.
|
||||
Line: 2 Col: 7 End tag (pre) seen too early. Expected other end tag.
|
||||
#document
|
||||
| <!DOCTYPE htML>
|
||||
| <html>
|
||||
|
@ -146,7 +146,7 @@ y"
|
|||
#data
|
||||
<!DOCTYPE htML><HTML><META><HEAD></HEAD></HTML>
|
||||
#errors
|
||||
Unexpected start tag HEAD in HEAD. Ignored.
|
||||
Line: 1 Col: 33 Unexpected start tag head in existing head. Ignored.
|
||||
#document
|
||||
| <!DOCTYPE htML>
|
||||
| <html>
|
||||
|
@ -157,7 +157,7 @@ Unexpected start tag HEAD in HEAD. Ignored.
|
|||
#data
|
||||
<!DOCTYPE htML><HTML><HEAD><head></HEAD></HTML>
|
||||
#errors
|
||||
Unexpected start tag HEAD in HEAD. Ignored.
|
||||
Line: 1 Col: 33 Unexpected start tag head in existing head. Ignored.
|
||||
#document
|
||||
| <!DOCTYPE htML>
|
||||
| <html>
|
||||
|
@ -167,8 +167,8 @@ Unexpected start tag HEAD in HEAD. Ignored.
|
|||
#data
|
||||
<textarea>foo<span>bar</span><i>baz
|
||||
#errors
|
||||
Unexpected start tag. Expected DOCTYPE.
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
|
||||
Line: 1 Col: 35 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -179,8 +179,8 @@ Unexpected end of file.
|
|||
#data
|
||||
<title>foo<span>bar</em><i>baz
|
||||
#errors
|
||||
Unexpected start tag. Expected DOCTYPE.
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
|
||||
Line: 1 Col: 30 Unexpected end of file. Expected end tag (title).
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -228,7 +228,7 @@ foo"
|
|||
#data
|
||||
<!DOCTYPE htML><html><head></head><body><ul><li><div><p><li></ul></body></html>
|
||||
#errors
|
||||
Missing end tag (div)
|
||||
Line: 1 Col: 60 Missing end tag (div, li).
|
||||
#document
|
||||
| <!DOCTYPE htML>
|
||||
| <html>
|
||||
|
@ -243,9 +243,9 @@ Missing end tag (div)
|
|||
#data
|
||||
<!doctype html><nobr><nobr><nobr>
|
||||
#errors
|
||||
Unexpected <nobr> tag.
|
||||
Unexpected <nobr> tag.
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 27 Unexpected start tag (nobr) implies end tag (nobr).
|
||||
Line: 1 Col: 33 Unexpected start tag (nobr) implies end tag (nobr).
|
||||
Line: 1 Col: 33 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
|
@ -258,8 +258,8 @@ Unexpected end of file.
|
|||
#data
|
||||
<!doctype html><nobr><nobr></nobr><nobr>
|
||||
#errors
|
||||
Unexpected <nobr> tag.
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 27 Unexpected start tag (nobr) implies end tag (nobr).
|
||||
Line: 1 Col: 40 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
|
|
|
@ -41,7 +41,7 @@ plaintext
|
|||
#data
|
||||
setting html's innerHTML
|
||||
#errors
|
||||
XXX innerHTML EOF
|
||||
Line: 1 Col: 24 XXX innerHTML EOF
|
||||
#document-fragment
|
||||
html
|
||||
#document
|
||||
|
@ -52,7 +52,7 @@ html
|
|||
#data
|
||||
<title>setting head's innerHTML</title>
|
||||
#errors
|
||||
Unexpected title element that belongs in head.
|
||||
Line: 1 Col: 7 Unexpected start tag (title) that can be in head. Moved.
|
||||
#document-fragment
|
||||
head
|
||||
#document
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#data
|
||||
<style> <!-- </style>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Unexpected end of file
|
||||
Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
|
||||
Line: 1 Col: 22 Unexpected end of file. Expected end tag (style).
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -13,7 +13,7 @@ Unexpected end of file
|
|||
#data
|
||||
<style> <!-- </style> --> </style>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -25,7 +25,7 @@ No DOCTYPE
|
|||
#data
|
||||
<style> <!--> </style>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -37,7 +37,7 @@ No DOCTYPE
|
|||
#data
|
||||
<style> <!---> </style>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -49,7 +49,7 @@ No DOCTYPE
|
|||
#data
|
||||
<iframe> <!---> </iframe>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -61,7 +61,7 @@ No DOCTYPE
|
|||
#data
|
||||
<iframe> <!--- </iframe>->x</iframe> --> </iframe>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -73,7 +73,7 @@ No DOCTYPE
|
|||
#data
|
||||
<script> <!-- </script> --> </script>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -85,7 +85,7 @@ No DOCTYPE
|
|||
#data
|
||||
<title> <!-- </title> --> </title>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -97,7 +97,7 @@ No DOCTYPE
|
|||
#data
|
||||
<textarea> <!--- </textarea>->x</textarea> --> </textarea>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -109,7 +109,7 @@ No DOCTYPE
|
|||
#data
|
||||
<style> <!</-- </style>x
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -121,7 +121,7 @@ No DOCTYPE
|
|||
#data
|
||||
<xmp> <!-- > --> </xmp>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 5 Unexpected start tag (xmp). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -132,7 +132,7 @@ No DOCTYPE
|
|||
#data
|
||||
<title>&</title>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -143,7 +143,7 @@ No DOCTYPE
|
|||
#data
|
||||
<title><!--&--></title>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -154,8 +154,8 @@ No DOCTYPE
|
|||
#data
|
||||
<title><!--</title>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Unexpected EOF
|
||||
Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE.
|
||||
Line: 1 Col: 19 Unexpected end of file. Expected end tag (title).
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -166,7 +166,7 @@ Unexpected EOF
|
|||
#data
|
||||
<noscript><!--</noscript>--></noscript>
|
||||
#errors
|
||||
No DOCTYPE
|
||||
Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#data
|
||||
<!doctype html></head> <head>
|
||||
#errors
|
||||
Unexpected start tag head. Ignored.
|
||||
Line: 1 Col: 29 Unexpected start tag head. Ignored.
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
|
@ -12,9 +12,9 @@ Unexpected start tag head. Ignored.
|
|||
#data
|
||||
<!doctype html></html> <head>
|
||||
#errors
|
||||
Unexpected start tag head.
|
||||
Unexpected start tag head in after body phase.
|
||||
Unexpected start tag head. Ignored.
|
||||
Line: 1 Col: 29 Unexpected start tag (head). Expected end of file.
|
||||
Line: 1 Col: 29 Unexpected start tag token (head) in the after body phase.
|
||||
Line: 1 Col: 29 Unexpected start tag head. Ignored.
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
|
@ -25,7 +25,7 @@ Unexpected start tag head. Ignored.
|
|||
#data
|
||||
<!doctype html></body><meta>
|
||||
#errors
|
||||
Unexpected meta element in after body phase.
|
||||
Line: 1 Col: 28 Unexpected start tag token (meta) in the after body phase.
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
|
@ -36,8 +36,8 @@ Unexpected meta element in after body phase.
|
|||
#data
|
||||
<!doctype HTml><form><div></form><div>
|
||||
#errors
|
||||
Form end tag ignored.
|
||||
Unexpected end of file.
|
||||
Line: 1 Col: 33 End tag (form) seen too early. Ignored.
|
||||
Line: 1 Col: 38 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <!DOCTYPE HTml>
|
||||
| <html>
|
||||
|
@ -72,9 +72,9 @@ Unexpected end of file.
|
|||
#data
|
||||
<!doctype>
|
||||
#errors
|
||||
No space after "doctype"
|
||||
Unexpected ">"
|
||||
Incorrect doctype
|
||||
Line: 1 Col: 9 No space after literal string 'DOCTYPE'.
|
||||
Line: 1 Col: 10 Unexpected > character. Expected DOCTYPE name.
|
||||
Line: 1 Col: 10 Erroneous DOCTYPE.
|
||||
#document
|
||||
| <!DOCTYPE >
|
||||
| <html>
|
||||
|
@ -84,8 +84,8 @@ Incorrect doctype
|
|||
#data
|
||||
<!---x
|
||||
#errors
|
||||
End of file in comment
|
||||
End of file before doctype
|
||||
Line: 1 Col: 6 Unexpected end of file in comment.
|
||||
Line: 1 Col: 6 Unexpected End of file. Expected DOCTYPE.
|
||||
#document
|
||||
| <!-- -x -->
|
||||
| <html>
|
||||
|
@ -96,8 +96,8 @@ End of file before doctype
|
|||
<body>
|
||||
<div>
|
||||
#errors
|
||||
Unexpected start tag (body)
|
||||
Expected closing tag. Unexpected end of file
|
||||
Line: 1 Col: 6 Unexpected start tag (body).
|
||||
Line: 2 Col: 5 Expected closing tag. Unexpected end of file.
|
||||
#document-fragment
|
||||
div
|
||||
#document
|
||||
|
@ -109,8 +109,8 @@ div
|
|||
<frameset></frameset>
|
||||
foo
|
||||
#errors
|
||||
Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Unexpected non-space characters in the after frameset phase. Ignored.
|
||||
Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Line: 2 Col: 3 Unexpected non-space characters in the after frameset phase. Ignored.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -122,8 +122,8 @@ Unexpected non-space characters in the after frameset phase. Ignored.
|
|||
<frameset></frameset>
|
||||
<noframes>
|
||||
#errors
|
||||
Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Expected closing tag. Unexpected end of file.
|
||||
Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Line: 2 Col: 10 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -136,8 +136,8 @@ Expected closing tag. Unexpected end of file.
|
|||
<frameset></frameset>
|
||||
<div>
|
||||
#errors
|
||||
Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Unexpected start tag (div) in the after frameset phase. Ignored.
|
||||
Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Line: 2 Col: 5 Unexpected start tag (div) in the after frameset phase. Ignored.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -149,7 +149,7 @@ Unexpected start tag (div) in the after frameset phase. Ignored.
|
|||
<frameset></frameset>
|
||||
</html>
|
||||
#errors
|
||||
Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -161,8 +161,8 @@ Unexpected start tag (frameset). Expected DOCTYPE.
|
|||
<frameset></frameset>
|
||||
</div>
|
||||
#errors
|
||||
Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Unexpected end tag (div) in the after frameset phase. Ignored.
|
||||
Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Line: 2 Col: 6 Unexpected end tag (div) in the after frameset phase. Ignored.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -173,9 +173,9 @@ Unexpected end tag (div) in the after frameset phase. Ignored.
|
|||
#data
|
||||
<form><form>
|
||||
#errors
|
||||
Unexpected start tag (form). Expected DOCTYPE.
|
||||
Unexpected start tag (form).
|
||||
Expected closing tag. Unexpected end of file.
|
||||
Line: 1 Col: 6 Unexpected start tag (form). Expected DOCTYPE.
|
||||
Line: 1 Col: 12 Unexpected start tag (form).
|
||||
Line: 1 Col: 12 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
|
@ -185,12 +185,427 @@ Expected closing tag. Unexpected end of file.
|
|||
#data
|
||||
<button><button>
|
||||
#errors
|
||||
Unexpected start tag (button). Expected DOCTYPE.
|
||||
Unexpected start tag (button) implies end tag (button).
|
||||
Expected closing tag. Unexpected end of file.
|
||||
Line: 1 Col: 8 Unexpected start tag (button). Expected DOCTYPE.
|
||||
Line: 1 Col: 16 Unexpected start tag (button) implies end tag (button).
|
||||
Line: 1 Col: 16 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <button>
|
||||
| <button>
|
||||
|
||||
#data
|
||||
<table><tr><td></th>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 20 Unexpected end tag (th). Ignored.
|
||||
Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <tbody>
|
||||
| <tr>
|
||||
| <td>
|
||||
|
||||
#data
|
||||
<table><caption><td>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 20 Unexpected end tag (td). Ignored.
|
||||
Line: 1 Col: 20 Unexpected table cell start tag (td) in the table body phase.
|
||||
Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <caption>
|
||||
| <tbody>
|
||||
| <tr>
|
||||
| <td>
|
||||
|
||||
#data
|
||||
<table><caption><div>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 21 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <caption>
|
||||
| <div>
|
||||
|
||||
#data
|
||||
</caption><div>
|
||||
#document-fragment
|
||||
caption
|
||||
#errors
|
||||
Line: 1 Col: 10 Unexpected end tag (caption). Ignored.
|
||||
Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <div>
|
||||
|
||||
#data
|
||||
<table><caption><div></caption>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 31 Unexpected end tag (caption). Missing end tag (div).
|
||||
Line: 1 Col: 31 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <caption>
|
||||
| <div>
|
||||
|
||||
#data
|
||||
<table><caption></table>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 24 Unexpected end table tag in caption. Generates implied end caption.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <caption>
|
||||
|
||||
#data
|
||||
</table><div>
|
||||
#document-fragment
|
||||
caption
|
||||
#errors
|
||||
Line: 1 Col: 8 Unexpected end table tag in caption. Generates implied end caption.
|
||||
Line: 1 Col: 8 Unexpected end tag (caption). Ignored.
|
||||
Line: 1 Col: 13 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <div>
|
||||
|
||||
#data
|
||||
<table><caption></body></col></colgroup></html></tbody></td></tfoot></th></thead></tr>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 23 Unexpected end tag (body). Ignored.
|
||||
Line: 1 Col: 29 Unexpected end tag (col). Ignored.
|
||||
Line: 1 Col: 40 Unexpected end tag (colgroup). Ignored.
|
||||
Line: 1 Col: 47 Unexpected end tag (html). Ignored.
|
||||
Line: 1 Col: 55 Unexpected end tag (tbody). Ignored.
|
||||
Line: 1 Col: 60 Unexpected end tag (td). Ignored.
|
||||
Line: 1 Col: 68 Unexpected end tag (tfoot). Ignored.
|
||||
Line: 1 Col: 73 Unexpected end tag (th). Ignored.
|
||||
Line: 1 Col: 81 Unexpected end tag (thead). Ignored.
|
||||
Line: 1 Col: 86 Unexpected end tag (tr). Ignored.
|
||||
Line: 1 Col: 86 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <caption>
|
||||
|
||||
#data
|
||||
<table><caption><div></div>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 27 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <caption>
|
||||
| <div>
|
||||
|
||||
#data
|
||||
<table><tr><td></body></caption></col></colgroup></html>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 22 Unexpected end tag (body). Ignored.
|
||||
Line: 1 Col: 32 Unexpected end tag (caption). Ignored.
|
||||
Line: 1 Col: 38 Unexpected end tag (col). Ignored.
|
||||
Line: 1 Col: 49 Unexpected end tag (colgroup). Ignored.
|
||||
Line: 1 Col: 56 Unexpected end tag (html). Ignored.
|
||||
Line: 1 Col: 56 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <tbody>
|
||||
| <tr>
|
||||
| <td>
|
||||
|
||||
#data
|
||||
</table></tbody></tfoot></thead></tr><div>
|
||||
#document-fragment
|
||||
td
|
||||
#errors
|
||||
Line: 1 Col: 8 Unexpected end tag (table). Ignored.
|
||||
Line: 1 Col: 16 Unexpected end tag (tbody). Ignored.
|
||||
Line: 1 Col: 24 Unexpected end tag (tfoot). Ignored.
|
||||
Line: 1 Col: 32 Unexpected end tag (thead). Ignored.
|
||||
Line: 1 Col: 37 Unexpected end tag (tr). Ignored.
|
||||
Line: 1 Col: 42 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <div>
|
||||
|
||||
#data
|
||||
<table><colgroup>foo
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 20 Unexpected non-space characters in table context caused voodoo mode.
|
||||
Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| "foo"
|
||||
| <table>
|
||||
| <colgroup>
|
||||
|
||||
#data
|
||||
foo<col>
|
||||
#document-fragment
|
||||
colgroup
|
||||
#errors
|
||||
Line: 1 Col: 3 Unexpected end tag (colgroup). Ignored.
|
||||
#document
|
||||
| <col>
|
||||
|
||||
#data
|
||||
<table><colgroup></col>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 23 This element (col) has no end tag.
|
||||
Line: 1 Col: 23 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <colgroup>
|
||||
|
||||
#data
|
||||
<frameset><div>
|
||||
#errors
|
||||
Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Line: 1 Col: 15 Unexpected start tag token (div) in the frameset phase. Ignored.
|
||||
Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <frameset>
|
||||
|
||||
#data
|
||||
</frameset><frame>
|
||||
#document-fragment
|
||||
frameset
|
||||
#errors
|
||||
Line: 1 Col: 11 Unexpected end tag token (frameset) in the frameset phase (innerHTML).
|
||||
#document
|
||||
| <frame>
|
||||
|
||||
#data
|
||||
<frameset></div>
|
||||
#errors
|
||||
Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE.
|
||||
Line: 1 Col: 16 Unexpected end tag token (div) in the frameset phase. Ignored.
|
||||
Line: 1 Col: 16 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <frameset>
|
||||
|
||||
#data
|
||||
</body><div>
|
||||
#document-fragment
|
||||
body
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected end tag (body). Ignored.
|
||||
Line: 1 Col: 12 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <div>
|
||||
|
||||
#data
|
||||
<table><tr><div>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 16 Unexpected start tag (div) in table context caused voodoo mode.
|
||||
Line: 1 Col: 16 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <div>
|
||||
| <table>
|
||||
| <tbody>
|
||||
| <tr>
|
||||
|
||||
#data
|
||||
</tr><td>
|
||||
#document-fragment
|
||||
tr
|
||||
#errors
|
||||
Line: 1 Col: 5 Unexpected end tag (tr). Ignored.
|
||||
#document
|
||||
| <td>
|
||||
|
||||
#data
|
||||
</tbody></tfoot></thead><td>
|
||||
#document-fragment
|
||||
tr
|
||||
#errors
|
||||
Line: 1 Col: 8 Unexpected end tag (tbody). Ignored.
|
||||
Line: 1 Col: 16 Unexpected end tag (tfoot). Ignored.
|
||||
Line: 1 Col: 24 Unexpected end tag (thead). Ignored.
|
||||
#document
|
||||
| <td>
|
||||
|
||||
#data
|
||||
<table><tr><div><td>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 16 Unexpected start tag (div) in table context caused voodoo mode.
|
||||
Line: 1 Col: 20 Unexpected implied end tag (div) in the table row phase.
|
||||
Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <div>
|
||||
| <table>
|
||||
| <tbody>
|
||||
| <tr>
|
||||
| <td>
|
||||
|
||||
#data
|
||||
<caption><col><colgroup><tbody><tfoot><thead><tr>
|
||||
#document-fragment
|
||||
tbody
|
||||
#errors
|
||||
Line: 1 Col: 9 Unexpected start tag (caption).
|
||||
Line: 1 Col: 14 Unexpected start tag (col).
|
||||
Line: 1 Col: 24 Unexpected start tag (colgroup).
|
||||
Line: 1 Col: 31 Unexpected start tag (tbody).
|
||||
Line: 1 Col: 38 Unexpected start tag (tfoot).
|
||||
Line: 1 Col: 45 Unexpected start tag (thead).
|
||||
#document
|
||||
| <tr>
|
||||
|
||||
#data
|
||||
<table><tbody></thead>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 22 Unexpected end tag (thead) in the table body phase. Ignored.
|
||||
Line: 1 Col: 22 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <tbody>
|
||||
|
||||
#data
|
||||
</table><tr>
|
||||
#document-fragment
|
||||
tbody
|
||||
#errors
|
||||
Line: 1 Col: 8 Unexpected end tag (table). Ignored.
|
||||
#document
|
||||
| <tr>
|
||||
|
||||
#data
|
||||
<table><tbody></body></caption></col></colgroup></html></td></th></tr>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 21 Unexpected end tag (body) in the table body phase. Ignored.
|
||||
Line: 1 Col: 31 Unexpected end tag (caption) in the table body phase. Ignored.
|
||||
Line: 1 Col: 37 Unexpected end tag (col) in the table body phase. Ignored.
|
||||
Line: 1 Col: 48 Unexpected end tag (colgroup) in the table body phase. Ignored.
|
||||
Line: 1 Col: 55 Unexpected end tag (html) in the table body phase. Ignored.
|
||||
Line: 1 Col: 60 Unexpected end tag (td) in the table body phase. Ignored.
|
||||
Line: 1 Col: 65 Unexpected end tag (th) in the table body phase. Ignored.
|
||||
Line: 1 Col: 70 Unexpected end tag (tr) in the table body phase. Ignored.
|
||||
Line: 1 Col: 70 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <tbody>
|
||||
|
||||
#data
|
||||
<table><tbody></div>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 20 Unexpected end tag (div) in table context caused voodoo mode.
|
||||
Line: 1 Col: 20 End tag (div) seen too early. Expected other end tag.
|
||||
Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <tbody>
|
||||
|
||||
#data
|
||||
<table><table>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 14 Unexpected start tag (table) implies end tag (table).
|
||||
Line: 1 Col: 14 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
| <table>
|
||||
|
||||
#data
|
||||
<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr>
|
||||
#errors
|
||||
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
|
||||
Line: 1 Col: 14 Unexpected end tag (body). Ignored.
|
||||
Line: 1 Col: 24 Unexpected end tag (caption). Ignored.
|
||||
Line: 1 Col: 30 Unexpected end tag (col). Ignored.
|
||||
Line: 1 Col: 41 Unexpected end tag (colgroup). Ignored.
|
||||
Line: 1 Col: 48 Unexpected end tag (html). Ignored.
|
||||
Line: 1 Col: 56 Unexpected end tag (tbody). Ignored.
|
||||
Line: 1 Col: 61 Unexpected end tag (td). Ignored.
|
||||
Line: 1 Col: 69 Unexpected end tag (tfoot). Ignored.
|
||||
Line: 1 Col: 74 Unexpected end tag (th). Ignored.
|
||||
Line: 1 Col: 82 Unexpected end tag (thead). Ignored.
|
||||
Line: 1 Col: 87 Unexpected end tag (tr). Ignored.
|
||||
Line: 1 Col: 87 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <table>
|
||||
|
||||
#data
|
||||
</table><tr>
|
||||
#document-fragment
|
||||
table
|
||||
#errors
|
||||
Line: 1 Col: 8 Unexpected end tag (table). Ignored.
|
||||
Line: 1 Col: 12 Expected closing tag. Unexpected end of file.
|
||||
#document
|
||||
| <tbody>
|
||||
| <tr>
|
||||
|
||||
#data
|
||||
<html></html><!-- foo -->
|
||||
#errors
|
||||
Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
|
||||
#document
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <!-- foo -->
|
|
@ -3,7 +3,7 @@ class String
|
|||
def fix_latex
|
||||
if #{html_math_engine} == 'itex2mml'
|
||||
s = self.gsub("\\mathop{", "\\operatorname{")
|
||||
s.gsub!(/\\begin{svg}.*?\\end{svg}/m, " ")
|
||||
s.gsub!(/\\begin\{svg\}.*?\\end\{svg\}/m, " ")
|
||||
s.gsub("\\space{", "\\itexspace{")
|
||||
else
|
||||
self
|
||||
|
|
Loading…
Reference in a new issue