about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-01-24 23:28:11 +0000
committerEric Wong <e@80x24.org>2017-01-24 23:28:25 +0000
commit69e6e45e58b4406e445de005a128150ba3c99a46 (patch)
tree09791bfb4c774588b77933929b5c8a3089d65cbf
parent841468954bf1e55ad596f4159725cf3dce3e0492 (diff)
downloadolddoc-69e6e45e58b4406e445de005a128150ba3c99a46.tar.gz
This allows us to avoid loading the 'cgi' library.
-rw-r--r--lib/oldweb.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/oldweb.rb b/lib/oldweb.rb
index b1b7c46..910afaf 100644
--- a/lib/oldweb.rb
+++ b/lib/oldweb.rb
@@ -5,7 +5,6 @@ require 'rdoc'
 require 'erb'
 require 'pathname'
 require 'yaml'
-require 'cgi'
 require 'uri'
 
 # oldweb is an \RDoc template and not intended as a programming API.
@@ -288,7 +287,7 @@ class Oldweb
   # reach into RDoc internals to generate less HTML
   module LessHtml # :nodoc:
     def accept_verbatim(verbatim)
-      @res << "\n<pre>#{CGI.escapeHTML(verbatim.text.rstrip)}</pre>\n"
+      @res << "\n<pre>#{verbatim.text.rstrip.encode(xml: :text)}</pre>\n"
     end
 
     def accept_heading(heading)