1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-02-09 13:38:37 +02:00

Update regex in string cleaner

This commit is contained in:
Ralph Slooten 2023-09-22 15:27:02 +12:00
parent 6a4e5fb03c
commit 446cae145f

View File

@ -61,7 +61,7 @@ func createSearchText(env *enmime.Envelope) string {
// CleanString removes unwanted characters from stored search text and search queries
func cleanString(str string) string {
// remove/replace new lines
re := regexp.MustCompile(`(\r?\n|\t|>|<|"|\,|;\(\))`)
re := regexp.MustCompile(`(\r?\n|\t|>|<|"|\,|;|\(|\))`)
str = re.ReplaceAllString(str, " ")
// remove duplicate whitespace and trim