Module: JekyllMiscellaneous::Filters::URIEncode

Defined in:
lib/jekyll_miscellaneous/filters/uri_encode.rb

Instance Method Summary collapse

Instance Method Details

#uri_encode(input) ⇒ Object

Encodes a string to URI, and returns the result.

Parameters:

input

The string to encode.

Returns:

The URI encoded string.

Example:

uri_encode('Hello, World!')
# => "Hello%2C%20World%21"


18
19
20
# File 'lib/jekyll_miscellaneous/filters/uri_encode.rb', line 18

def uri_encode(input)
  URI.encode_www_form_component(input)
end