fixes #3967
This commit is contained in:
@@ -165,7 +165,7 @@ module Sources
|
|||||||
|
|
||||||
# href may be missing the `http://` bit (ex: `inprnt.com`, `//inprnt.com`). Add it if missing.
|
# href may be missing the `http://` bit (ex: `inprnt.com`, `//inprnt.com`). Add it if missing.
|
||||||
uri = Addressable::URI.heuristic_parse(element["href"]) rescue nil
|
uri = Addressable::URI.heuristic_parse(element["href"]) rescue nil
|
||||||
if uri.present?
|
if uri.present? && uri.path.present?
|
||||||
uri.scheme ||= "http"
|
uri.scheme ||= "http"
|
||||||
element["href"] = uri.to_s
|
element["href"] = uri.to_s
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user