Commit 22d50711 authored by davelopez's avatar davelopez
Browse files

Fix tool link encoding

Makes it easier to share when pasting it in oder contexts outside the web browser.
parent 71237cf5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@ import { getAppRoot } from "onload/loadConfig";
import { copy } from "utils/clipboard";

export function copyLink(toolId, message) {
    copy(`${window.location.origin + getAppRoot()}root?tool_id=${toolId}`, message);
    const link = `${window.location.origin + getAppRoot()}root?tool_id=${toolId}`;
    // Encode the link to handle special characters in tool id
    copy(encodeURI(link), message);
}

export function copyId(toolId, message) {