various ways of escaping content in ruby Posted by Jesse Johnson on 5 August 2011, 4:08 am It’s difficult to keep these all straight: CGI::escapeHMTL ERB::Util::html_escape CGI::escape – replaces URI::escape URI::encode_www_form URI::encode_www_form_component String::inspect