# module Chef::Mixin::XMLEscape::PureRuby

### Constants

CP1252
PREDEFINED

  www.w3.org/TR/REC-xml/#dt-chardata

VALID

  www.w3.org/TR/REC-xml/#charsets

### Public Instance Methods

xml_escape(unescaped_str) click to toggle source

    # File lib/chef/mixin/xml_escape.rb, line 105
    def xml_escape(unescaped_str)
      begin
        unescaped_str.unpack("U*").map {|char| xml_escape_char!(char)}.join
      rescue
        unescaped_str.unpack("C*").map {|char| xml_escape_char!(char)}.join
      end
    end