method

encode_www_form_component

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: URI
encode_www_form_component(str, enc=nil) public

Encode given str to URL-encoded form data.

This method doesn’t convert *, -, ., 0-9, A-Z, _, a-z, but does convert SP (ASCII space) to + and converts others to %XX.

If enc is given, convert str to the encoding before percent encoding.

This is an implementation of http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data

See URI.decode_www_form_component, URI.encode_www_form

Show source
Register or log in to add new notes.