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-7.6.0 lib/extensions/rhocgi/cgi.rb
rhodes-7.5.1 lib/extensions/rhocgi/cgi.rb
rhodes-7.4.1 lib/extensions/rhocgi/cgi.rb
rhodes-7.1.17 lib/extensions/rhocgi/cgi.rb
rhodes-6.2.0 lib/extensions/rhocgi/cgi.rb
rhodes-6.0.11 lib/extensions/rhocgi/cgi.rb
rhodes-5.5.18 lib/extensions/rhocgi/cgi.rb
rhodes-5.5.17 lib/extensions/rhocgi/cgi.rb
rhodes-5.5.15 lib/extensions/rhocgi/cgi.rb
rhodes-5.5.0.22 lib/extensions/rhocgi/cgi.rb
rhodes-5.5.2 lib/extensions/rhocgi/cgi.rb
rhodes-5.5.0.7 lib/extensions/rhocgi/cgi.rb
rhodes-5.5.0.3 lib/extensions/rhocgi/cgi.rb
rhodes-5.5.0 lib/extensions/rhocgi/cgi.rb
tauplatform-1.0.3 lib/extensions/rhocgi/cgi.rb
tauplatform-1.0.2 lib/extensions/rhocgi/cgi.rb
tauplatform-1.0.1 lib/extensions/rhocgi/cgi.rb
rhodes-3.5.1.12 lib/extensions/rhocgi/cgi.rb
rhodes-3.3.5 lib/extensions/rhocgi/cgi.rb
rhodes-3.4.2 lib/extensions/rhocgi/cgi.rb