views:

92

answers:

2

Is there a built in way to convert special characters in rails from ASCII to html?

I saw 'htmlentities' but saw it is form a while back and wondered if there was anything more generic lately?

A: 

Are you looking for CGI.unescape? Give an example of the special characters you want to convert.

Ryan Oberoi
A: 

Let's say we want to output Renée Zellweger... and we want to write...

    flash[:notice] = 'Renée Zellweger was successfully created.'

without having to worry about writing é...

Thanks a lot!