diff --git a/lib/meme.php b/lib/meme.php index 26f83fd..ecab241 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -25,7 +25,7 @@ function renderMeme(string $title, string $textContent, string $createdAt, strin $meme_out = str_replace('__TEMPLATE_MEME_TITLE__', htmlspecialchars($title), $meme_template); $meme_out = str_replace('__TEMPLATE_MEME_AUTHOR__', htmlspecialchars($userNickname), $meme_out); $meme_out = str_replace('__TEMPLATE_MEME_DATE__', htmlspecialchars($createdAt), $meme_out); - $meme_out = str_replace('__TEMPLATE_MEME_IMAGE__', htmlspecialchars($filePath), $meme_out); + $meme_out = str_replace('__TEMPLATE_MEME_IMAGE__', '/' . htmlspecialchars($filePath), $meme_out); return str_replace('__TEMPLATE_MEME_TEXT__', htmlspecialchars($textContent), $meme_out); }