diff --git a/lib/facebooker2/rails/helpers/javascript.rb b/lib/facebooker2/rails/helpers/javascript.rb index dc6e489..1847286 100644 --- a/lib/facebooker2/rails/helpers/javascript.rb +++ b/lib/facebooker2/rails/helpers/javascript.rb @@ -31,8 +31,12 @@ module Facebooker2 s.appendChild(e); }()); - JAVASCRIPT - block_given? ? concat(js) : js + JAVASCRIPT + if ::Rails::VERSION::STRING > "2" + js.html_safe + else + block_given? ? concat(js) : js + end end end end