From 65a74dfce6e5209edeccceb6a7cf77eae550396b Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Wed, 20 Aug 2025 20:52:10 +0200 Subject: [PATCH] URL-Escape spaces in default image urls --- lib/posts.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/posts.lua b/lib/posts.lua index fc2f614..661d1e4 100644 --- a/lib/posts.lua +++ b/lib/posts.lua @@ -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 }