URL-Escape spaces in default image urls

This commit is contained in:
Talia 2025-08-20 20:52:10 +02:00
parent 6b9fe816a8
commit 65a74dfce6
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -34,8 +34,7 @@ local function read_post(file)
local cover_image = file:gsub("md$", "jpg")
if io.open(cover_image) then
head.cover_image = "/images/" .. cover_image:match("[^/]+$")
print(head.cover_image)
head.cover_image = "/images/" .. cover_image:match("[^/]+$"):gsub(" ", "%%20")
end
return { head = head, body = body }