aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-12-22 10:56:00 +0000
committerLouise Crow <louise.crow@gmail.com>2014-12-22 16:33:13 +0000
commitcd68dbe8ef1339b930aa494a4fdae6cd2d6a50e7 (patch)
tree30de6e5ef57f1f09e2a418af87bf96e53b6f60ec /spec/controllers/general_controller_spec.rb
parent55f7ac2004f53ebc48efb90c45f64563a7cd660d (diff)
Sanitize the blog contents0.18.0.17hotfix/0.18.0.17
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r--spec/controllers/general_controller_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 7590a5b42..df8554f0c 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -53,6 +53,18 @@ describe GeneralController, 'when getting the blog feed' do
end
end
+ context 'when the blog has entries' do
+
+ render_views
+
+ it 'should escape any javascript from the entries' do
+ controller.stub!(:quietly_try_to_open).and_return(load_file_fixture("blog_feed.atom"))
+ get :blog
+ response.body.should_not include('<script>alert("exciting!")</script>')
+ end
+
+ end
+
end
describe GeneralController, "when showing the frontpage" do