JSON breaks RJS page.replace_html when it is used w/partial
Brought to you by:
didosevilla
When this library is included, it causes erroneous escaping of \n characters in javascript that is returned by RJS.
Example:
RJS file:
page.replace_html 'target', :partial => 'target'
RHTML partial:
some text
more text
RJS is returned as :
Element.update('target', 'some text \\n more text')
Should be:
Element.update('target', 'some text \n more text')
So the end result is that \n's are rendered as visible text into the webpage, instead of being just formatting of the source html.
Logged In: YES
user_id=783043
Originator: YES
seems that functionality of this library already exists in Rails 1.1, so removing it fixed the problem.