Skip to content
instance method

CGI::Escape#escape_html

(::string str) -> ::String
escape_html(string)

Alias of #escapeHTML

Escape special characters in HTML, namely '&\"<>

Example
CGI.escapeHTML('Usage: foo "bar" <baz>')
   # => "Usage: foo &quot;bar&quot; &lt;baz&gt;"