Method: Rex::Text.xml_char_encode

Defined in:
lib/rex/text/encode.rb

.xml_char_encode(str) ⇒ Object

Encode an ASCII string so it’s safe for XML. It’s a wrapper for to_hex_ascii.



93
94
95
# File 'lib/rex/text/encode.rb', line 93

def self.xml_char_encode(str)
  self.to_hex_ascii(str, "&#x", 1, ";")
end