sanitze "koko <em>loves</em> ruby", tags: 'demd'
will leave the <em>s here
because the syntax asks you to do
sanitze "koko <em>loves</em> ruby", tags: %w(demd)
i would probably do [tags].flatten within the sanitize method to allow strings as well as arrays...
Don't ignore non Enumerable values passed to sanitize (closes #5585)
When someone accidentally passes a string to sanitize like:
sanitize("<span>foo</span>", :tags => "b")
there is no indication that it's the wrong way and span
will not be removed.
@dorkalev thanks for submitting this. I didn't go with wrapping approach, though, because it's safer to raise.