debian-mirror-gitlab/app/helpers/url_helper.rb

12 lines
188 B
Ruby
Raw Normal View History

2023-03-17 16:20:25 +05:30
# frozen_string_literal: true
module UrlHelper
def escaped_url(url)
return unless url
Addressable::URI.escape(url)
rescue Addressable::URI::InvalidURIError
nil
end
end