Innate::Helper::CGI

Public Class Methods

h(input) click to toggle source
u(input) click to toggle source
Alias for: url_encode

Public Instance Methods

html_and_code_escape(input) click to toggle source

safely escape all HTML and code

    # File lib/innate/helper/cgi.rb, line 45
45:       def html_and_code_escape(input)
46:         Rack::Utils.escape_html(input.to_s).gsub(/#([{@$]@?)/, '#\1')
47:       end
Also aliased as: h
html_escape(input) click to toggle source

Shortcut for Rack::Utils.escape_html

@param [#] input @return [String]

    # File lib/innate/helper/cgi.rb, line 32
32:       def html_escape(input)
33:         Rack::Utils.escape_html(input.to_s)
34:       end
html_unescape(input) click to toggle source

Shortcut for CGI.unescapeHTML

@param [#] input @return [String]

    # File lib/innate/helper/cgi.rb, line 40
40:       def html_unescape(input)
41:         ::CGI.unescapeHTML(input.to_s)
42:       end
url_decode(input) click to toggle source

Shortcut for Rack::Utils.unescape

@param [#] input @return [String] URI-decoded representation of input

    # File lib/innate/helper/cgi.rb, line 24
24:       def url_decode(input)
25:         Rack::Utils.unescape(input.to_s)
26:       end
url_encode(input) click to toggle source

Shortcut for Rack::Utils.escape

@param [#] input @return [String] URI-encoded representation of input

    # File lib/innate/helper/cgi.rb, line 15
15:       def url_encode(input)
16:         Rack::Utils.escape(input.to_s)
17:       end
Also aliased as: u

Private Instance Methods

h(input) click to toggle source
u(input) click to toggle source
Alias for: url_encode

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.