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:
parent
6a4e5fb03c
commit
446cae145f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user