Is it a Ruby ? Rails ? or JS ? problem

In a Rails controller action, I am receiving a string parameter back
from an Ajax request

#using inline RJS (Remote JavaScript), I render html replacing a hidden
input field in a form
render :update do |page|
page.remove (‘new_title’)
page.insert_html(:after, ‘hidden_values’, “”)
page.form.reset ‘propform’
end

if there is no single quote in params[:new_title] = “John D. is a
stupid and silly boy”
I get the full string as a value in the input field
but
if there is a single quote in params[:new_title] = “John D.'s sister
is a nice beautiful girl”
I get only "“John D.”

where is the problem… is theer anyway to avoid it ?

thanks

joss

On 2007-02-07 14:20:15 +0100, Josselin [email protected] said:

  page.form.reset 'propform'

where is the problem… is theer anyway to avoid it ?

thanks

joss

got it ! : I must write : VALUE="#{params[:new_title]}"

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs