Skip to content

Commit

Permalink
fix URI::escape with CGI:escape
Browse files Browse the repository at this point in the history
According to this issue: ruby/uri#14
  • Loading branch information
ipstone committed Jul 4, 2022
1 parent 6839882 commit ce43b55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/podcast.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require 'mp3info'
require 'rss/maker'
require 'uri'
require 'cgi'

module Podcast

Expand Down Expand Up @@ -83,9 +84,9 @@ def get_rss
item.title = mp3
## add a base url
if base != ''
link = base + '/' + URI::escape(mp3.path)
link = base + '/' + CGI::escape(mp3.path)
else
link = URI::escape(mp3.path)
link = CGI::escape(mp3.path)
end
item.link = link
item.date = mp3.mtime
Expand Down

0 comments on commit ce43b55

Please sign in to comment.