ActiveSupport 3.x.x will escape UTF8 characters and some HTML entities by default, which meant that the code to truncate notification alerts wouldn't work as designed. E.g., with AS 3.x.x "é" would be encoded to \u00e9 which is six bytes, not two. This was changed for AS 4.x.x here: rails/rails@80e7552. Separate tests are provided for the different versions of ActiveSupport. Tests can be run for AS 3.x.x by temporarily changing the gemspec version requirement, running `bundle`, then running the specs. This commit also refactors the truncation and encoding related logic into a new class.
We're only using very basic ActiveSupport public API, so it should be okay to assume compatibility with all 4.x.x versions. Fixes #67
…es were not delivered