From 56cd5f0078a9c7cfe783c69dea284ad231725afb Mon Sep 17 00:00:00 2001 From: Son Roy Almerol Date: Thu, 29 Aug 2024 12:17:51 -0400 Subject: [PATCH] add all special characters valid for URIs --- utils/logs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/logs.go b/utils/logs.go index 3769235f..d9f21c01 100644 --- a/utils/logs.go +++ b/utils/logs.go @@ -8,7 +8,7 @@ import ( ) func cleanString(text string) string { - urlRegex := `[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[a-zA-Z0-9+%/.\-:_?&=]+` + urlRegex := `[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[a-zA-Z0-9+%/.\-:_?&=#@+]+` re := regexp.MustCompile(urlRegex) safeString := re.ReplaceAllString(text, "[redacted url]")