Ahoy m8ies, Quick question. Is there any existing demo code or a library which handles stripping unwanted tags from form fields? Also, a form might allow image tags, but we might want to strip out any paramters other than SRC ? Anohter issue is how handle inputs such as these: - <b>1 is less than 2</b> - <b>1 is < than 2</b> In the second case, we need to guess that < is not opening a tag, and convert it to a special character. Thanks for any ideas or links! Jasn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Ahoy m8ies, > > Quick question. > > Is there any existing demo code or a library which handles stripping > unwanted tags from form fields?You might look at strip_links and strip_tags http://api.rubyonrails.com/classes/ActionView/Helpers/TextHelper.html#M000622 Also, look at the tidy library and gem http://tidy.sourceforge.net/> > Also, a form might allow image tags, but we might want to strip out > any paramters other than SRC ? > > Anohter issue is how handle inputs such as these: > > - <b>1 is less than 2</b> > - <b>1 is < than 2</b> > > In the second case, we need to guess that < is not opening a tag, and > convert it to a special character. > > Thanks for any ideas or links! > > Jasn > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Is there any existing demo code or a library which handles stripping > unwanted tags from form fields? > > Also, a form might allow image tags, but we might want to strip out > any paramters other than SRC ?http://svn.techno-weenie.net/projects/plugins/white_list/README -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.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 -~----------~----~----~----~------~----~------~--~---
Wonderful, thanks Rick and Philip On 21/01/2007, at 8:34 AM, Rick Olson wrote:> >> Is there any existing demo code or a library which handles stripping >> unwanted tags from form fields? >> >> Also, a form might allow image tags, but we might want to strip out >> any paramters other than SRC ? > > http://svn.techno-weenie.net/projects/plugins/white_list/README > > > -- > Rick Olson > http://weblog.techno-weenie.net > http://mephistoblog.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 -~----------~----~----~----~------~----~------~--~---