Option for sanitize to whitelist specific characters
wahlg opened this issue · comments
Greg Wahl commented
- Rails version: 4.2.7.1
- Algolia Rails integration version: 1.15.1
- Algolia Client Version: 1.11.0
- Language Version: 2.3.8
Description
Would it be possible to add more features for attribute sanitization, or to allow a custom sanitizer to be passed in? Right now it looks like the only supported option is sanitize: true
which performs full HTML sanitization on all attributes:
Specifically, I'm interested in the ability to whitelist the &
character since it is getting indexed as &
in Algolia when included in a string attribute.
Steps To Reproduce
Add sanitize: true
to the list of options passed to algoliasearch
. Create an attribute that has an ampersand:
attribute :some_attribute do
'This & That'
end
Index the record and see it shows up as This & That