Spec for not allowing user to do the XSS
This commit is contained in:
parent
293445225a
commit
5cbccda33a
1 changed files with 8 additions and 0 deletions
|
|
@ -42,6 +42,14 @@ describe ApplicationHelper do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "#person_image_tag" do
|
||||||
|
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_image_tag(@person).should_not include("<h1>")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe "markdownify" do
|
describe "markdownify" do
|
||||||
describe "autolinks" do
|
describe "autolinks" do
|
||||||
it "should not allow basic XSS/HTML" do
|
it "should not allow basic XSS/HTML" do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue