diff --git a/lib/gollum-lib/macro/audio.rb b/lib/gollum-lib/macro/audio.rb index e222213c..66826acb 100755 --- a/lib/gollum-lib/macro/audio.rb +++ b/lib/gollum-lib/macro/audio.rb @@ -2,7 +2,7 @@ module Gollum class Macro class Audio < Gollum::Macro def render (fname) - "" + "" end end end diff --git a/lib/gollum-lib/macro/video.rb b/lib/gollum-lib/macro/video.rb index 9c64a096..e2f05ebf 100644 --- a/lib/gollum-lib/macro/video.rb +++ b/lib/gollum-lib/macro/video.rb @@ -2,7 +2,7 @@ module Gollum class Macro class Video < Gollum::Macro def render (fname) - "" + "" end end end diff --git a/lib/gollum-lib/sanitization.rb b/lib/gollum-lib/sanitization.rb index d5a79f02..0f6ddf9f 100644 --- a/lib/gollum-lib/sanitization.rb +++ b/lib/gollum-lib/sanitization.rb @@ -1,4 +1,5 @@ ::Loofah::HTML5::SafeList::ACCEPTABLE_PROTOCOLS.add('apt') +::Loofah::HTML5::SafeList::ALLOWED_ATTRIBUTES.add('controls') module Gollum class Sanitization diff --git a/test/test_macros.rb b/test/test_macros.rb index bdbd1d33..001f9389 100644 --- a/test/test_macros.rb +++ b/test/test_macros.rb @@ -200,4 +200,10 @@ def render(opts) @wiki.write_page("_Footer", :markdown, "<>", commit_details) assert_match /Next(.*)test-2<span>/, @wiki.page("test-1").footer.formatted_data end + + test "Control attributes for Audio and Video are not sanitized" do + @wiki.write_page("AudioTagTest", :markdown, "<>\n<>", commit_details) + # The Macros must return controls=true until https://github.com/flavorjones/loofah/issues/242 is resolved + assert_match /