rgrove/sanitize — pull request #94 by alperkokmen (2014-02-01 02:09:24+00:00)
Title: Convert :whitespace_elements into a Hash.

This will let developers to configure Sanitize to specify the
replacements for :whitespace_elements found in the input. Previously,
developers couldn't specify the text to be inserted before and after
the :whitespace_elements.

- updated :whitespace_elements to be a Hash rather than an Array.
- updated CleanElement#call to use appropriate replacements for the
element found instead of hardcoded space (' ').
- made sure existing tests were not broken and added new tests for the
functionality added by overriding replacement values for tags.
- updated README to reflect these changes.

NOTE: Changes are backwards compatible. Code will detect Array types
and will convert them into the new Hash format.