Hi there,
is there any RoR function that works like PHP´s htmlentities()?
Stripping all html tags that I don´t allow.
Thank you
Hi there,
is there any RoR function that works like PHP´s htmlentities()?
Stripping all html tags that I don´t allow.
Thank you
In a rails view file, I believe the method h() is analogous to php’s
htmlentities. I assume h() is an alias of the method CGI::escapeHTML(),
but
I’m not sure.
Good luck.
Jimmy Kittiyachavalit wrote:
In a rails view file, I believe the method h() is analogous to php’s
htmlentities. I assume h() is an alias of the method CGI::escapeHTML(),
but
I’m not sure.Good luck.
Yes, that’s right
<%=h ‘bar’ %>
returns:
<foo>bar</foo>
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs