debian-mirror-gitlab/app/helpers/url_helper.rb
2023-03-17 16:20:25 +05:30

11 lines
188 B
Ruby

# frozen_string_literal: true
module UrlHelper
def escaped_url(url)
return unless url
Addressable::URI.escape(url)
rescue Addressable::URI::InvalidURIError
nil
end
end