Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/models/custom_emoji.rb`: Not a real conflict, just upstream changing a line too close to a glitch-soc-specific validation. Applied upstream changes. - `app/models/public_feed.rb`: Not a real conflict, just upstream changing a line too close to a glitch-soc-specific parameter documentation. Applied upstream changes.
This commit is contained in:
@@ -8,7 +8,7 @@ class HashtagNormalizer
|
||||
private
|
||||
|
||||
def remove_invalid_characters(str)
|
||||
str.gsub(/[^[:alnum:]#{Tag::HASHTAG_SEPARATORS}]/, '')
|
||||
str.gsub(Tag::HASHTAG_INVALID_CHARS_RE, '')
|
||||
end
|
||||
|
||||
def ascii_folding(str)
|
||||
|
||||
@@ -199,7 +199,8 @@ class Request
|
||||
rescue IPAddr::InvalidAddressError
|
||||
Resolv::DNS.open do |dns|
|
||||
dns.timeouts = 5
|
||||
addresses = dns.getaddresses(host).take(2)
|
||||
addresses = dns.getaddresses(host)
|
||||
addresses = addresses.filter { |addr| addr.is_a?(Resolv::IPv6) }.take(2) + addresses.filter { |addr| !addr.is_a?(Resolv::IPv6) }.take(2)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user