Merge pull request #228 from jekyll/fix-for-invalid-url
Fix for image.path causing an invalid url error
This commit is contained in:
commit
ba3b326513
|
@ -168,7 +168,8 @@ module Jekyll
|
|||
image["path"] ||= image["facebook"] || image["twitter"]
|
||||
return @image = nil unless image["path"]
|
||||
|
||||
unless absolute_url? image["path"]
|
||||
# absolute_url? will return nil for an invalid URL
|
||||
if absolute_url?(image["path"]) == false
|
||||
image["path"] = filters.absolute_url image["path"]
|
||||
end
|
||||
|
||||
|
|
|
@ -563,7 +563,7 @@ RSpec.describe Jekyll::SeoTag::Drop do
|
|||
let(:image) { ":" }
|
||||
|
||||
it "returns nil" do
|
||||
expect(subject.image["path"]).to eql("/:")
|
||||
expect(subject.image["path"]).to eql(":")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue