Is it possible to have comments stay commented out when using sanitize? For example, I have this in my view: <%= sanitize @description %> and @description = "<!-- end time -->" but sanitize converts: <!-- end time --> to <!-- end time --> so the words <!-- end time --> actually shows up on the website. anyone know if it''s possible to tell sanitize to leave html comments alone? I tried adding this to environment.rb but no luck: config.action_view.sanitized_allowed_tags = ''!--'', ''--'' --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
vince
2008-Feb-07 18:32 UTC
Re: possible to hide html comments using sanitize in rails 2.0?
anyone have any ideas? i''ve been stuck on this for a few days and we can''t launch till this is done :( On Feb 4, 11:55 am, vince <stha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is it possible to have comments stay commented out when using > sanitize? > > For example, I have this in my view: > > <%= sanitize @description %> > > and @description = "<!-- end time -->" > > but sanitize converts: > > <!-- end time --> > to > <!-- end time --> > > so the words <!-- end time --> actually shows up on the website. > > anyone know if it''s possible to tell sanitize to leave html comments > alone? > > I tried adding this to environment.rb but no luck: > config.action_view.sanitized_allowed_tags = ''!--'', ''--''--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---