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