🐛 (embedBubble) Fix sanitize url adding https to variable
This commit is contained in:
@@ -164,11 +164,14 @@ export const omit: Omit = (obj, ...keys) => {
|
||||
return ret
|
||||
}
|
||||
|
||||
const isVariableString = (str: string): boolean => /^\{\{.*\}\}$/.test(str)
|
||||
|
||||
export const sanitizeUrl = (url: string): string =>
|
||||
url.startsWith('http') ||
|
||||
url.startsWith('mailto:') ||
|
||||
url.startsWith('tel:') ||
|
||||
url.startsWith('sms:')
|
||||
url.startsWith('sms:') ||
|
||||
isVariableString(url)
|
||||
? url
|
||||
: `https://${url}`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user