diff --git a/.github/scripts/load-cards.ts b/.github/scripts/load-cards.ts
index ff50125da..693d129f2 100644
--- a/.github/scripts/load-cards.ts
+++ b/.github/scripts/load-cards.ts
@@ -282,11 +282,11 @@ function generateCommentBody(
if (item.status === "added") {
commentBody += `➕ New card: ${fileName}
\n\n`;
- commentBody += `**File:** [${item.file}](${fileUrl}) \n\n`;
+ commentBody += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
commentBody += " \n\n";
} else if (item.status === "removed") {
commentBody += `🗑️ Deleted card: ${fileName}
\n\n`;
- commentBody += `**File:** [${item.file}](${fileUrl}) \n\n`;
+ commentBody += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
commentBody += " \n\n";
} else if (item.card) {
const langInfo = item.usedLanguage ? ` (found using ${item.usedLanguage})` : "";
@@ -307,7 +307,7 @@ function generateCommentBody(
commentBody += "\n\n";
} else if (item.error) {
commentBody += `⚠️ Error processing ${fileName}
\n\n`;
- commentBody += `**File:** [${item.file}](${fileUrl}) \n`;
+ commentBody += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
commentBody += `**Error:** ${item.error}\n\n`;
commentBody += " \n\n";
}