Welcome to mirror list, hosted at ThFree Co, Russian Federation.

url_helper.rb « helpers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9083ca4e8ddf8bda19e1b5da9496b43a8745ab64 (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module UrlHelper
  def escaped_url(url)
    return unless url

    Addressable::URI.escape(url)
  rescue Addressable::URI::InvalidURIError
    nil
  end
end