lib/nanoc/helpers/xml_sitemap.rb in nanoc-4.5.1 vs lib/nanoc/helpers/xml_sitemap.rb in nanoc-4.5.2
- old
+ new
@@ -28,10 +28,10 @@
items.sort_by(&:identifier).each do |item|
reps = item.reps.reject { |r| r.raw_path.nil? }
reps.reject! { |r| !select_proc[r] } if select_proc
reps.sort_by { |r| r.name.to_s }.each do |rep|
xml.url do
- xml.loc @config[:base_url] + rep.path
+ xml.loc URI.escape(@config[:base_url] + rep.path)
xml.lastmod item[:mtime].__nanoc_to_iso8601_date unless item[:mtime].nil?
xml.changefreq item[:changefreq] unless item[:changefreq].nil?
xml.priority item[:priority] unless item[:priority].nil?
end
end