Add test of markdown link protocol sanitization

This commit is contained in:
Andrew Kvalheim 2022-03-17 16:44:27 -07:00
parent e486ce55d7
commit a281110b29

View file

@ -9,6 +9,10 @@ describe FormatHelper, type: :helper do
expect(markdown(nil)).to eq ''
end
it "doesn't render unsafe URI schemes" do
expect(markdown('[a](javascript:b)')).to eq "<p><a>a</a></p>\n"
end
it 'should return HTML for header markdown' do
expect(markdown('# this is my header')).to eq "<h1>this is my header</h1>\n"
end