URI.encode_www_form_component doesn't encode bad chars properly
URI.encode_www_form_component "\u02DA", Encoding::WINDOWS_1252 #=> "%26730%3B" # Expected: #=> "%26%23730%3B"
"For each character in the entry's name and value that cannot be expressed using the selected character encoding, replace the character by a string consisting of a U+0026 AMPERSAND character (&), a "#" (U+0023) character, one or more ASCII digits representing the Unicode code point of the character in base ten, and finally a ";" (U+003B) character."
Updated by jeremyevans0 (Jeremy Evans) about 1 year ago
- Assignee set to akira (akira yamada)
- Status changed from Open to Assigned
- File uri-encode-form-compontent.patch uri-encode-form-compontent.patch added
I agree this is a bug that should be fixed, and the patch is a proper way to fix it. Attached is an updated patch that applies against the master branch, along with a test.