String with single quote

Hi,

I’m rendering a text inside a modal (bootstrap). But this text has this
character: ’
Example: Affonso Romano de Sant’Anna

When the text above is rendered, nothing occurs.
I think is some problem with that character.

Tips on how to solve this problem ?
Thanks.

How are you rendering that text?

On Sun, Apr 26, 2015 at 1:22 PM, Gm [email protected] wrote:

Thanks.
.
For more options, visit https://groups.google.com/d/optout.


Daniel Evans

Hi Daniel,

modal.find(’.modal-body’).html(’<%= raw @text.content %>’);

I think if you step back, you will see what’s going on here. Your
single-quote in the Ruby-drawn content is prematurely ending the single
quote surrounding the JavaScript rendered string.

Try escaping your content with gsub("’", “’”).

Walter

You were right.
Thanks.