summaryrefslogtreecommitdiff
path: root/lib/cgi/util.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cgi/util.rb')
-rw-r--r--lib/cgi/util.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb
index c2327072398..83c310b3cb5 100644
--- a/lib/cgi/util.rb
+++ b/lib/cgi/util.rb
@@ -38,6 +38,11 @@ module CGI::Util
string.gsub(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__)
end
+ begin
+ require 'cgi/escape'
+ rescue LoadError
+ end
+
# Unescape a string that has been HTML-escaped
# CGI::unescapeHTML("Usage: foo &quot;bar&quot; &lt;baz&gt;")
# # => "Usage: foo \"bar\" <baz>"