mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 18:38:03 +08:00
Move escape_uri method to a more suitable place
This commit is contained in:
@ -2,6 +2,7 @@ require 'socket'
|
||||
require 'ipaddr'
|
||||
require 'excon'
|
||||
require 'rate_limiter'
|
||||
require 'url_helper'
|
||||
|
||||
# Determine the final endpoint for a Web URI, following redirects
|
||||
class FinalDestination
|
||||
@ -237,7 +238,7 @@ class FinalDestination
|
||||
end
|
||||
|
||||
def escape_url
|
||||
TopicEmbed.escape_uri(
|
||||
UrlHelper.escape_uri(
|
||||
CGI.unescapeHTML(@url),
|
||||
Regexp.new("[^#{URI::PATTERN::UNRESERVED}#{URI::PATTERN::RESERVED}#]")
|
||||
)
|
||||
|
Reference in New Issue
Block a user