method
quote_string
v1_9_3_125 -
Show latest stable
- Class:
Net::HTTPGenericRequest
quote_string(str, charset)private
No documentation available.
# File lib/net/http.rb, line 2036
def quote_string(str, charset)
str = str.encode(charset, fallback:->(c){'&#%d;'%c.encode("UTF-8").ord}) if charset
str = str.gsub(/[\\"]/, '\\\&')
end