brianmario/escape_utils — Issue #18: unfiltered invalid XML characters
Author: dylanahsmith
Created: 2011-10-14 14:08:43+00:00
State: open

A simple example is trying to escape the group separator character:

```ruby
require 'rubygems'
require 'escape_utils'
puts EscapeUtils.escape_html("\x1d", false).inspect
# => "\035"
```

If this literal character appears in XML, then it will show the following error in Chrome:
PCDATA invalid Char value 29

Active support to_xml will convert this character to an asterisk, which prevents this problem. So this bug prevents it from being used to escape arbitrary XML data while making sure the output is always valid.