BACKGROUND: I am looking to decode strings that include HTML entities - i.e. "c#" should be converted to "c%23".
I have found the HTMLEntities project to be generally recommended, but have also found what I think is a simpler solution: Using CGI.escape(*string*)
or ERB::Util.url_encode(*string*)
.
QUESTION: Is there any reason why using CGI.escape or ERB::Util.url_encode for this task is a bad idea? If so, how exactly does one implement HTMLEntities in a Rails 3 project - I can't seem to figure it out from the documentation!