fix(create-call): fix url parsing (#1235)

This commit is contained in:
Rohan Sreerama
2025-06-11 02:01:44 -07:00
committed by GitHub
parent b0b74871e7
commit 812076d4fe

View File

@@ -116,8 +116,8 @@ const customSanitizeFunction = (value) => {
/* trims characters at the beginning and at the end of a string */ /* trims characters at the beginning and at the end of a string */
value = value.trim(); value = value.trim();
/* Verify strings including 'http' via new URL */ // Only attempt to parse if the whole string is a URL
if (value.includes('http')) { if (/^https?:\/\/\S+$/.test(value)) {
value = new URL(value).toString(); value = new URL(value).toString();
} }
} }