rails/rails_xss — pull request #11 by boone (2011-10-20 15:37:01+00:00)
Title: Fix escape_javascript to support SafeBuffer strings

I ran into escape_javascript problems on Rails 2.3.14 using rails_xss. It appears to be related to this Rails issue:

https://github.com/rails/rails/issues/1553

I basically added the escape_javascript method and the test from the pull request that fixed Rails 1553:

https://github.com/rails/rails/pull/1558