Hi,

> So those two string above contain ' and =B4 spcecial characters.
>
> In the application I need to feed those to a javascript function using
> onclick, so I use:
>
> onclick=3D"remove('<%=3D card.name %>')"
>
> Doing it that way, the HTML results in:
>
> onclick=3D"remove('Validaci=F3n')"
> onclick=3D"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=3D"remove('<%=3D card.name.gsub( "'" ){ "\\'" } %>')"

--=20
NOBUOKA Yu