Y. NOBUOKA wrote in post #996593: > Hi, > >> onclick="remove('Tom's card')" >> >> You can see that the first one is ok, but the second on is not because >> of the ' in between the m and the s which causes the javascript >> to fail. > > One way to avoiding this is escaping the apostrophe character (') by > using > a backslash character (\). > > Please try following code: > onclick="remove('<%= card.name.gsub( "'" ){ "\\'" } %>')" That I've done and it goes ok without disturbing the accents in spanish. Thanks a lot. -- Posted via http://www.ruby-forum.com/.