Module: Innate::Helper::CGI

### Home Classes Methods

### In Files

- lib/innate/helper/cgi.rb

### Methods

- ::h
- ::u
- #html_and_code_escape
- #html_escape
- #html_unescape
- #url_decode
- #url_encode

### Class/Module Index

Quicksearch

- Innate
- Innate::Action
- Innate::Adapter
- Innate::Cache
- Innate::Cache::API
- Innate::Cache::DRb
- Innate::Cache::FileBased
- Innate::Cache::Marshal
- Innate::Cache::Memory
- Innate::Cache::YAML
- Innate::Current
- Innate::Etanni
- Innate::Helper
- Innate::Helper::Aspect
- Innate::Helper::Aspect::SingletonMethods
- Innate::Helper::CGI
- Innate::Helper::Flash
- Innate::Helper::Link
- Innate::Helper::Redirect
- Innate::Helper::Render
- Innate::HelperAccess
- Innate::HelpersHelper
- Innate::LRUHash
- Innate::LogHub
- Innate::Mock
- Innate::Mock::Session
- Innate::Node
- Innate::Optioned
- Innate::Optioned::SingletonMethods
- Innate::Options
- Innate::Request
- Innate::Response
- Innate::Rewrite
- Innate::Route
- Innate::Session
- Innate::Session::Flash
- Innate::SingletonMethods
- Innate::StateAccessor
- Innate::Traited
- Innate::Trinity
- Innate::URLMap
- Innate::View
- Innate::View::ERB
- Innate::View::Etanni
- Innate::View::None
- Logger
- Logger::ColorFormatter
- Object

No matching classes.

# Innate::Helper::CGI

### Public Class Methods

h(input) click to toggle source
Alias for: html_and_code_escape
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
    def html_and_code_escape(input)
      Rack::Utils.escape_html(input.to_s).gsub(/#([{@$]@?)/, '&#35;\1')
    end

Also aliased as: h
html_escape(input) click to toggle source

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

html_unescape(input) click to toggle source

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

url_decode(input) click to toggle source

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

url_encode(input) click to toggle source

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

Also aliased as: u

[Validate]

Generated with the Darkfish Rdoc Generator 2.