I love Sanitize. It's an amazing utility. The only issue I have w/ it is the fact that it takes forever to prepare a development environment w/ it because it uses Nokogiri
, which is a pain for compile time. Are there any programs that do what Sanitize does (if nothing else than mildly what it does) w/out using Nokogiri
? This would help exponentially!
Are there any better alternatives to Sanitize for a Ruby app?
896 views Asked by T145 At
1
Rails has its own
SanitizeHelper
.According to http://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html, it will
You can use it in a view like so
You can visit the link to see more customizing options like:
Custom Use (only the mentioned tags and attributes are allowed, nothing else)