Restrict valid page names

This commit is contained in:
Zef Hemel
2023-07-07 11:44:05 +02:00
parent 59ff0643b0
commit 04d6de18e6
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -394,8 +394,8 @@ export function renderMarkdownToHtml(
t.attrs!.src = options.translateUrls!(t.attrs!.src!);
}
if (t.name === "a") {
t.attrs!.href = options.translateUrls!(t.attrs!.href!);
if (t.name === "a" && t.attrs!.href) {
t.attrs!.href = options.translateUrls!(t.attrs!.href);
}
});
}