MCPcopy Create free account
hub / github.com/docusealco/docuseal / normalizeUrl

Method normalizeUrl

app/javascript/elements/markdown_editor.js:57–64  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

55 }
56
57 normalizeUrl (url) {
58 if (!url) return url
59 if (/^{/i.test(url)) return url
60 if (/^https?:\/\//i.test(url)) return url
61 if (/^mailto:/i.test(url)) return url
62
63 return `https://${url}`
64 }
65
66 show (url, pos, { focus = false } = {}) {
67 this.input.value = url || ''

Callers 1

showMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected