Encodes and decodes XML escape characters (&, ", ', <, >)
Add this line to your application's Gemfile:
gem 'xml_escape'
And then execute:
$ bundle
Or install it yourself as:
$ gem install xml_escape
Include the module XmlEscape
to get the methods xml_encode
(plus its
alias escape_xml
) and xml_decode
(plus its alias unescape_xml
).
All methods take a string you want to be transformed as their single argument.
- Fork it ( http://github.com//xml_escape/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request