From 6358fbad302497a5fba0d1a64f5be49d136c8393 Mon Sep 17 00:00:00 2001 From: Jadin Heaston Date: Tue, 3 Jan 2023 13:50:32 -0600 Subject: [PATCH] Adding check for ```addHttp()``` to see if ```mailto:``` or ```tel:``` is present.Signed-off-by: Jadin Heaston --- client/utils/template.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/utils/template.ts b/client/utils/template.ts index 5ff501a5..9e9fc83c 100644 --- a/client/utils/template.ts +++ b/client/utils/template.ts @@ -20,7 +20,7 @@ export const formatLocation = (location?: Location): string => { }; export const addHttp = (url: string) => { - if (url.search(/^http[s]?:\/\//) == -1) { + if (url.search(/^http[s]?:\/\//) == -1 && url.search(/^mailto:/) == -1 && url.search(/^tel:/) == -1) { url = 'http://' + url; }