Hi is there an equivalent ruby method to JavaScript encodeURIComponent method? i am using the URI.unescape(str) but it recognizes the "£" (after encodeURIComponent it becomes "%C2%A3") as a "?" sign. any solution’s? thanks
Hi is there an equivalent ruby method to JavaScript encodeURIComponent method? i am using
Share
found here: How do I raw URL encode/decode in JavaScript and Ruby to get the same values in both?
URI.escape is obslete since last I posted. As per suggested comment, now use:
ERB::Util.url_encodeorCGI.escape