Skip to content

Commit

Permalink
fix: open page in same window for recursive routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Jul 12, 2024
1 parent 3c7edc8 commit 7235361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/src/core/components/markdown/Markdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MyRenderer<T = never> extends marked.Renderer<T> {
if (href === null) {
return text;
}
const attributes = !href.startsWith("/") && !href.startsWith("#") ? `target="_blank" rel="noopener noreferrer nofollow"` : "";
const attributes = !href.startsWith("/") && !href.startsWith("../") && !href.startsWith("#") ? `target="_blank" rel="noopener noreferrer nofollow"` : "";
const attributeTitle = title ? `title="${title}"` : "";
const noProtocolUrl = href.replace("http:", "").replace("https:", "");
const out = `<a href="${noProtocolUrl}" ${attributeTitle} ${attributes} >${text}</a>`;
Expand Down

0 comments on commit 7235361

Please sign in to comment.