From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7A62A1F463 for ; Sun, 15 Dec 2019 03:14:41 +0000 (UTC) From: Eric Wong To: Subject: [PATCH] replace URI.escape with CGI.escape Date: Sun, 15 Dec 2019 03:14:41 +0000 Message-Id: <20191215031441.5055-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(source) end