Class | CGI |
In: |
lib/standard/facets/cgi/esc.rb
lib/standard/facets/cgi/escape_html.rb lib/standard/facets/cgi/marshal.rb |
Parent: | Object |
escape_html | -> | escapeHTML |
@deprecated | ||
unescapeHTML | -> | unescape_html |
escapeElement | -> | escape_element |
unescapeElement | -> | unescape_element |
Extends `escape_html` to support escape modes. By default all strings are escaped on `&`, `>` and `<`. Add the `:nonstandard` mode to omit this conversion.
If no mode is given then the `:default` mode is used.
Available modes include:
@example
escape_html("<tag>") #=> "<tag>" escape_html("Example\nString", :newlines) #=> "Example String" escape_html("\"QUOTE\"", false) #=> "\"QUOTE\""
Create an hidden input field through which an object can can be marshalled. This makes it very easy to pass form data between requests.