String (Class)

In: tangerine.rb
Parent: Object

Methods

Public Instance methods

Return a copy of the string escaped suitable for inclusion in XML. By default, all values will be escaped suitable for inclusion in a XML document (< gets &lt;, > gets &gt;, etc…).

[Source]

     # File tangerine.rb, line 316
316:   def xml_escape
317:     self.gsub("&", "&amp;").
318:       gsub('"', "&quot;").
319:       gsub('>', "&gt;").
320:       gsub('<', "&lt;").
321:       gsub("'", "&apos;")
322:   end

[Validate]