about summary refs log tree commit homepage
path: root/lib/oldweb.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oldweb.rb')
-rw-r--r--lib/oldweb.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/oldweb.rb b/lib/oldweb.rb
index 5b55019..74b4db1 100644
--- a/lib/oldweb.rb
+++ b/lib/oldweb.rb
@@ -5,7 +5,7 @@ require 'rdoc'
 require 'erb'
 require 'pathname'
 require 'yaml'
-require 'uri'
+require 'cgi'
 
 # oldweb is an \RDoc template and not intended as a programming API.
 # You may specify it as an \RDoc formatter:
@@ -87,7 +87,7 @@ class Oldweb
 
     if cgit_url
       cgit_url += '/tree/%s' # path name
-      tag = @git_tag and cgit_url << "id=#{URI.escape(tag)}"
+      tag = @git_tag and cgit_url << "id=#{CGI.escape(tag)}"
       cgit_url << '#n%d' # lineno
       @old_vcs_url = cgit_url
     end
@@ -297,7 +297,7 @@ class Oldweb
   def method_srclink(m) # :nodoc:
     url = @old_vcs_url or return ""
     line = m.line or return ""
-    path = URI.escape(m.file_name)
+    path = CGI.escape(m.file_name)
     %Q(<a href="#{url % [ path, line ]}">source</a>)
   end