Sha256: 2cebeae5b9c9740c9fcc473b22c300fdf33ca5595c43d8e5a286364a00d27235

Contents?: true

Size: 372 Bytes

Versions: 92

Compression:

Stored size: 372 Bytes

Contents

class CGI
  TABLE_FOR_ESCAPE_HTML__ = {
    '&' => '&',
    '"' => '"',
    '<' => '&lt;',
    '>' => '&gt;',
  }

  # Escape special characters in HTML, namely &\"<>
  #   CGI::escapeHTML('Usage: foo "bar" <baz>')
  #      # => "Usage: foo &quot;bar&quot; &lt;baz&gt;"
  def CGI::escapeHTML(string)
    string.gsub(/[&\"<>]/, TABLE_FOR_ESCAPE_HTML__)
  end

end

Version data entries

92 entries across 92 versions & 2 rubygems

Version Path
rhodes-3.3.4 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.3 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.3.beta.4 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.3.beta.3 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.3.beta.2 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.3.beta.1 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.2 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.2.beta.7 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.2.beta.6 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.2.beta.5 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.2.beta.4 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.2.beta.3 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.2.beta.2 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.2.beta.1 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.1 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.0 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.0.beta.3 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.0.beta.2 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.0.beta.1 lib/extensions/rhocgi/cgi.rb
rhodes-3.2.3 lib/extensions/rhocgi/cgi.rb