Skip to content

Commit

Permalink
Make case insensitive <body>, </body> tags replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
zsand authored and Mark Connell committed Apr 28, 2009
1 parent 1d0165d commit b244ae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rubaidh/google_analytics.rb
Expand Up @@ -18,9 +18,9 @@ def google_analytics_code
# (see http://www.google.com/support/googleanalytics/bin/answer.py?answer=55527&topic=11006)
def add_google_analytics_code
if GoogleAnalytics.defer_load
response.body.sub! '</body>', "#{google_analytics_code}</body>" if response.body.respond_to?(:sub!)
response.body.sub! /<\/body>/i, "#{google_analytics_code}</body>" if response.body.respond_to?(:sub!)
else
response.body.sub! '<body>', "<body>#{google_analytics_code}" if response.body.respond_to?(:sub!)
response.body.sub! /<body>/i, "<body>#{google_analytics_code}" if response.body.respond_to?(:sub!)
end
end
end
Expand Down

0 comments on commit b244ae0

Please sign in to comment.