mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-25 01:37:52 -05:00
Hotfix: don't escape HTML for analytics script
This commit is contained in:
@@ -25,4 +25,4 @@
|
||||
/ Placed at the end of the document so the pages load faster
|
||||
= javascript_include_tag "application"
|
||||
|
||||
= Growstuff::Application.config.analytics_code
|
||||
!= Growstuff::Application.config.analytics_code
|
||||
|
||||
@@ -58,9 +58,10 @@ describe 'layouts/application.html.haml', :type => "view" do
|
||||
end
|
||||
|
||||
it 'includes the analytics code' do
|
||||
Growstuff::Application.config.analytics_code = 'ANALYTICS'
|
||||
Growstuff::Application.config.analytics_code = '<script>alert("foo!")</script>'
|
||||
render
|
||||
rendered.should contain 'ANALYTICS'
|
||||
assert_select "script", :text => 'alert("foo!")'
|
||||
rendered.should_not contain 'script'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user