escape urls

This commit is contained in:
Ben Balter 2017-04-06 19:07:40 -04:00
parent b9cd5de1d0
commit 058b337aba
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
1 changed files with 4 additions and 4 deletions

View File

@ -108,13 +108,12 @@ module Jekyll
end
end
# TODO: escape
def logo
return unless site["logo"]
if absolute_url? site["logo"]
site["logo"]
uri_escape site["logo"]
else
absolute_url site["logo"]
uri_escape absolute_url site["logo"]
end
end
@ -127,7 +126,6 @@ module Jekyll
# 4. The `image.twitter` key
#
# The resulting path is always an absolute URL
# TODO escape
def image
return unless image = page["image"]
@ -138,6 +136,8 @@ module Jekyll
image["path"] = absolute_url image["path"]
end
image["path"] = uri_escape image["path"]
image.to_liquid
end