diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-12-22 10:56:00 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-12-22 16:45:51 +0000 |
commit | bf29c559bde6408c1a8d94145e5f974d1ced10c6 (patch) | |
tree | b54545b45f85c768f30c0157175e278f3f86da5b /spec/controllers | |
parent | 4230c641e34fb4988c0df0aa8dff1b4781f54db2 (diff) |
Sanitize the blog contents0.16.0.10hotfix/0.16.0.10
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/general_controller_spec.rb | 12 |
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 |