safely escape all HTML and code
# File lib/innate/helper/cgi.rb, line 45 def html_and_code_escape(input) Rack::Utils.escape_html(input.to_s).gsub(/#([{@$]@?)/, '#\1') end
Shortcut for Rack::Utils.escape_html
@param [to_s] input @return [String]
# File lib/innate/helper/cgi.rb, line 32 def html_escape(input) Rack::Utils.escape_html(input.to_s) end
Shortcut for CGI.unescapeHTML
@param [to_s] input @return [String]
# File lib/innate/helper/cgi.rb, line 40 def html_unescape(input) ::CGI.unescapeHTML(input.to_s) end
Shortcut for Rack::Utils.unescape
@param [to_s] input @return [String] URI-decoded representation of input
# File lib/innate/helper/cgi.rb, line 24 def url_decode(input) Rack::Utils.unescape(input.to_s) end
Shortcut for Rack::Utils.escape
@param [to_s] input @return [String] URI-encoded representation of input
# File lib/innate/helper/cgi.rb, line 15 def url_encode(input) Rack::Utils.escape(input.to_s) end
Generated with the Darkfish Rdoc Generator 2.