Jason_B
(Jason B)
1
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
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/
Rick_Olson
(Rick Olson)
3
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
Jason_B
(Jason B)
4
Wonderful, thanks Rick and Philip