Use hex instead of base64 (safe characters)

This commit is contained in:
Stefan Schlott 2015-02-16 16:45:31 +01:00
parent 4aa09c8704
commit 0914e7586f

View file

@ -23,12 +23,12 @@ cal = RiCal.Calendar do |cal|
event.location = e[:location][:name] event.location = e[:location][:name]
end end
end end
event.uid = Digest::SHA1.base64digest("#{e[:startdate]}#{e[:title]}") event.uid = Digest::SHA1.hexdigest("#{e[:startdate]}#{e[:title]}")
if e[:url] if e[:url]
event.url = e[:url] event.url = e[:url]
elsif e.identifier.start_with?('/events') or e.identifier.start_with?('/activities') elsif e.identifier.start_with?('/events') or e.identifier.start_with?('/activities')
event.url = "#{@config[:base_url]}#{e.path}" event.url = "#{@config[:base_url]}#{e.path}"
event.uid = Digest::SHA1.base64digest("#{@config[:base_url]}#{e.path}") event.uid = Digest::SHA1.hexdigest("#{@config[:base_url]}#{e.path}")
end end
end end
end end