Hi there, is there any RoR function that works like PHP´s htmlentities()? Stripping all html tags that I don´t allow. Thank you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jimmy Kittiyachavalit
2006-Dec-01 20:52 UTC
Re: probally a regular question about security
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. On 12/1/06, Raphael Martins <rafudu.webdesign-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hi there, > is there any RoR function that works like PHP´s htmlentities()? > Stripping all html tags that I don´t allow. > > Thank you > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 ''<foo>bar</foo>'' %> returns: <foo>bar</foo> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---