I Want to use an URL to call a method but i need it to be written with HTML Entities:
so if i have http://www.myurl.com/foobar for example using a Ruby on Rails helper i can get something like:
http%3A%2F%2Fwww.myurl.com%2Ffoobar
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know if there’s anything built directly into rails to do all of that escaping, but if you
require 'cgi'you can useCGI::escape.Obviously, to make it look a little nicer in your views, or wherever, you could wrap that method in a helper.