Skip to content

Commit

Permalink
add all special characters valid for URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Son Roy Almerol committed Aug 29, 2024
1 parent a2e3d98 commit 56cd5f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
Expand Down

0 comments on commit 56cd5f0

Please sign in to comment.