Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
shareUrl: use URL interface instead of string manipulations
contributore937f1b6012c
diff --git a/apps/client/src/widgets/shared_info.tsx b/apps/client/src/widgets/shared_info.tsxindex cb98027c25..bd0b72bc23 100644--- a/apps/client/src/widgets/shared_info.tsx+++ b/apps/client/src/widgets/shared_info.tsx@@ -24,8 +24,7 @@ export default function SharedInfo() {const shareId = getShareId(note);if (syncServerHost) {- const cleanedServerHost = syncServerHost.replace(/\/$/, "");- link = `${cleanedServerHost}/share/${shareId}`;+ link = new URL(`/share/${shareId}`, syncServerHost).href;} else {let host = location.host;if (host.endsWith("/")) {