Skip to content

Commit 27cbb15

Browse files
committed
Comment out some placeholder logic for link extension
1 parent 00b4dc4 commit 27cbb15

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/components/ui/coaching-sessions/coaching-notes/extensions.tsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const Extensions = (
4545
Text,
4646
Underline,
4747
Link.configure({
48-
openOnClick: false,
48+
openOnClick: true,
4949
autolink: true,
5050
defaultProtocol: "https",
5151
protocols: ["http", "https"],
@@ -61,33 +61,33 @@ export const Extensions = (
6161
return false;
6262
}
6363

64-
// disallowed protocols
65-
const disallowedProtocols = ["ftp", "file", "mailto"];
66-
const protocol = parsedUrl.protocol.replace(":", "");
64+
// Placeholder for future disallowed domains if we want to add any
65+
// const disallowedProtocols = ["ftp", "file", "mailto"];
66+
// const protocol = parsedUrl.protocol.replace(":", "");
6767

68-
if (disallowedProtocols.includes(protocol)) {
69-
return false;
70-
}
68+
// if (disallowedProtocols.includes(protocol)) {
69+
// return false;
70+
// }
7171

72-
// only allow protocols specified in ctx.protocols
73-
const allowedProtocols = ctx.protocols.map((p) =>
74-
typeof p === "string" ? p : p.scheme
75-
);
72+
// // only allow protocols specified in ctx.protocols
73+
// const allowedProtocols = ctx.protocols.map((p) =>
74+
// typeof p === "string" ? p : p.scheme
75+
// );
7676

77-
if (!allowedProtocols.includes(protocol)) {
78-
return false;
79-
}
77+
// if (!allowedProtocols.includes(protocol)) {
78+
// return false;
79+
// }
8080

81-
// disallowed domains
82-
const disallowedDomains = [
83-
"example-phishing.com",
84-
"malicious-site.net",
85-
];
86-
const domain = parsedUrl.hostname;
81+
// Placeholder for future disallowed domains if we want to add any
82+
// const disallowedDomains = [
83+
// "example-phishing.com",
84+
// "malicious-site.net",
85+
// ];
86+
// const domain = parsedUrl.hostname;
8787

88-
if (disallowedDomains.includes(domain)) {
89-
return false;
90-
}
88+
// if (disallowedDomains.includes(domain)) {
89+
// return false;
90+
// }
9191

9292
// all checks have passed
9393
return true;

0 commit comments

Comments
 (0)