Repository - API - Source
EscapeUtils.escape_url
and EscapeUtils.unescape_url
given that Ruby 2.5 provides an optimized CGI.escape
and CGI.unescape
with mostly similar performance.URI.escape
and URI.unescape
if they don't already exist.EscapeUtils.escape_html_once
and EscapeUtils.rb_eu_escape_html_once_as_html_safe
as faster implementations of Rails escape_once
helper.escape_html
and escape_html_as_html_safe
given that Ruby 2.5 optimized CGI.escapeHTML
to be twice faster than the EscapeUtils
implementation.unescape_html
given that Ruby 2.5 optimized CGI.unescapeHTML
to be only 40% slower than th EscapeUtils
implementation.escape_html_as_html_safe
as well.EscapeUtils.html_safe
, there's no reason to escape for slashes /
in 2022.escape_javascript
Now escapes, Backquotes (```), Dollar ($
), U+2000
and U+2001
~
like CGI.escape
does since Ruby 2.5