I would like to restrict entry from a textarea to inline HTML elements only... it would seem natural for String.stripTags() to allow for excepted elements to be passed to it but alas it does not. Has anyone already implemented such an extension which they would be happy to share? Perhaps someone can suggest another method? Thank you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I think you''ll need to find a regular expression that does that job. On Sep 13, 11:05 am, craigloftus <craiglof...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I would like to restrict entry from a textarea to inline HTML elements > only... it would seem natural for String.stripTags() to allow for > excepted elements to be passed to it but alas it does not. > > Has anyone already implemented such an extension which they would be > happy to share? > > Perhaps someone can suggest another method? > > Thank you--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Stripping certain tags appears to be quite simple when using Function#wrap from 1.6 Here''s an explanation http://thinkweb2.com/projects/prototype/2007/09/14/wrap-it-up/ -- View this message in context: http://www.nabble.com/Exceptions-when-using-stripTags%28%29-tf4436365.html#a12694263 Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---