2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-09 22:22:54 +08:00

FIX: email styling with blacklisted iframes

This commit is contained in:
Régis Hanol 2016-10-21 12:37:03 +02:00
parent 35d248ab0d
commit 2a61cc8c88
2 changed files with 13 additions and 2 deletions

View file

@ -95,6 +95,12 @@ describe Email::Styles do
expect(frag.at('iframe')).to be_blank
expect(frag.at('a')).to be_blank
end
it "won't allow empty iframe src, strips them with no link" do
frag = html_fragment("<iframe src=''></iframe>")
expect(frag.at('iframe')).to be_blank
expect(frag.at('a')).to be_blank
end
end
context "rewriting protocol relative URLs to the forum" do