Fix #3738: Artist URL search should be case-insensitive for domains.

This commit is contained in:
evazion
2018-09-05 19:14:24 -05:00
parent c2cf6a5441
commit aee1906761
3 changed files with 11 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ class ArtistUrl < ApplicationRecord
nil
else
url = url.sub(%r!^https://!, "http://")
url = url.sub(%r!^http://([^/]+)!i) { |domain| domain.downcase }
url = url.sub(%r!^http://blog\d+\.fc2!, "http://blog.fc2")
url = url.sub(%r!^http://blog-imgs-\d+\.fc2!, "http://blog.fc2")
url = url.sub(%r!^http://blog-imgs-\d+-\w+\.fc2!, "http://blog.fc2")