olddoc user/dev discussion/patches/bugs/etc
 help / color / mirror / code / Atom feed
* [PATCH] replace URI.escape with CGI.escape
@ 2019-12-15  3:14 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2019-12-15  3:14 UTC (permalink / raw)
  To: olddoc-public

The former is obsolete, apparently.
---
 lib/oldweb.rb | 6 +++---
 1 file 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
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-15  3:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-15  3:14 [PATCH] replace URI.escape with CGI.escape Eric Wong

Code repositories for project(s) associated with this public inbox

	http://80x24.org/olddoc.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).