Is it possible to pass regular expression to the list of allowed html attributes for sanitize method in rails3? In my particular situation I would like to allow all attributes starting with "data-"
Either on sanitize call
sanitize(my_string, :tags => %w(div span), :attributes => my_regular_expression)
or in application.rb like
config.action_view.sanitized_allowed_attributes = 'id', 'style', my_regular_expression
hmmm… computer says no.
Would be great feature, though. You could add it as a feature request on rails.