Merge commit 'f378f10404
' into kb_migration
This commit is contained in:
commit
edb2a5dcf3
153 changed files with 1225 additions and 1025 deletions
|
@ -77,8 +77,8 @@ class BackupService < BaseService
|
|||
path = m.file&.path
|
||||
next unless path
|
||||
|
||||
path = path.gsub(/\A.*\/system\//, '')
|
||||
path = path.gsub(/\A\/+/, '')
|
||||
path = path.gsub(%r{\A.*/system/}, '')
|
||||
path = path.gsub(%r{\A/+}, '')
|
||||
download_to_zip(zipfile, m.file, path)
|
||||
end
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ class FetchLinkCardService < BaseService
|
|||
URL_PATTERN = %r{
|
||||
(#{Twitter::TwitterText::Regex[:valid_url_preceding_chars]}) # $1 preceding chars
|
||||
( # $2 URL
|
||||
(https?:\/\/) # $3 Protocol (required)
|
||||
(https?://) # $3 Protocol (required)
|
||||
(#{Twitter::TwitterText::Regex[:valid_domain]}) # $4 Domain(s)
|
||||
(?::(#{Twitter::TwitterText::Regex[:valid_port_number]}))? # $5 Port number (optional)
|
||||
(/#{Twitter::TwitterText::Regex[:valid_url_path]}*)? # $6 URL Path and anchor
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class FetchOEmbedService
|
||||
ENDPOINT_CACHE_EXPIRES_IN = 24.hours.freeze
|
||||
URL_REGEX = /(=(http[s]?(%3A|:)(\/\/|%2F%2F)))([^&]*)/i
|
||||
URL_REGEX = %r{(=(https?(%3A|:)(//|%2F%2F)))([^&]*)}i
|
||||
|
||||
attr_reader :url, :options, :format, :endpoint_url
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class SearchService < BaseService
|
|||
end
|
||||
|
||||
def url_query?
|
||||
@resolve && /\Ahttps?:\/\//.match?(@query)
|
||||
@resolve && %r{\Ahttps?://}.match?(@query)
|
||||
end
|
||||
|
||||
def url_resource_results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue