Test for XSS in comment

This commit is contained in:
Dorian 2010-12-26 02:10:00 +01:00
parent d6e72cd2bb
commit b348f094ab

View file

@ -234,6 +234,12 @@ describe ApplicationHelper do
person_link(@person).should include @person.diaspora_handle
end
it "should not allow basic XSS/HTML" do
@person.profile.first_name = "I'm <h1>Evil"
@person.profile.last_name = "I'm <h1>Evil"
person_link(@person).should_not include("<h1>")
end
end
context 'performance' do
before do