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?

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.