Forum: Ruby on Rails Ajax rjs - escape single quote in returned string ?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ee0293412faca21e4ebf3326ed9d5f8c?d=identicon&s=25 Kad Kerforn (kadoudal)
on 2007-02-07 12:58
I replace an outer html as following :

page.insert_html(:after, 'hidden_values', "<INPUT TYPE=HIDDEN
id='new_title' NAME='new_title' VALUE='#{params[:new_title]}' />")

but if params[:new_title]  string has a single quote  like "can't get
all the string"
the html is shorten..
what's the trick to escape the returned string ?


This topic is locked and can not be replied to.