test/devcenter-parser_test.rb in devcenter-parser-1.4.3 vs test/devcenter-parser_test.rb in devcenter-parser-1.4.4
- old
+ new
@@ -11,11 +11,11 @@
assert_parsing_unsanitized_result nil, :maruku, ''
end
it 'maintains script tags' do
md = '<script>alert("hi")</script>'
- assert_parsing_unsanitized_result md, :maruku, '<script>alert("hi")</script>'
+ assert_parsing_unsanitized_result md, :maruku, '<script><![CDATA[alert("hi")]]></script>'
assert_parsing_unsanitized_result md, :github, '<script>alert("hi")</script>'
end
end
@@ -36,9 +36,16 @@
it 'removes script tags and their content' do
md = '<strong>clean<script>alert("hack!")</script></strong>'
html = '<p><strong>clean</strong></p>'
assert_maruku_result md, html
assert_github_result md, html
+ end
+
+ it 'allows embedding vimeo videos' do
+ src = <<-SRC
+<iframe src=\"https://player.vimeo.com/video/61044807?title=0&byline=0&portrait=0&color=a086ee\" width=\"500\" height=\"281\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
+SRC
+ assert_github_result src, src
end
describe 'github markdown' do
it 'generates apostrophes from single quotes in plain text' do