Skip to content

Commit

Permalink
Avoid being escaped by rails 3 html_safe filters
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jun 26, 2011
1 parent ab3b072 commit 5cf7eab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/split/analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def tracking_code(options={})
# needs more options: http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html
account = options.delete(:account)

<<-EOF
code = <<-EOF
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '#{account}']);
Expand All @@ -21,6 +21,8 @@ def tracking_code(options={})
})();
</script>
EOF
code = raw(code)if defined?(raw)
code
end

def custom_variables
Expand Down

0 comments on commit 5cf7eab

Please sign in to comment.