Doodle::EscapeXML

Constants

ESCAPE
(Not documented)

Public Class Methods

escape(s) click to toggle source

(Not documented)

# File lib/doodle/xml.rb, line 13
    def self.escape(s)
      s.to_s.gsub(/[&"><]/) { |special| ESCAPE[special] }
    end
unescape(s) click to toggle source

(Not documented)

# File lib/doodle/xml.rb, line 16
    def self.unescape(s)
      ESCAPE.inject(s.to_s) do |str, (k, v)|
        # don't use gsub! here - don't want to modify argument
        str.gsub(v, k)
      end
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.