From ad9a444a525e51290a1845927e84188d2e9f18bf Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 10 Dec 2024 11:36:41 +0000 Subject: [Minor] Some adjustments --- lualib/lua_mime.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lualib/lua_mime.lua') diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index 24d02c304..1135f2b63 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -969,7 +969,7 @@ exports.anonymize_message = function(task, settings) local rspamd_re = require "rspamd_regexp" local lua_util = require "lua_util" -- We exclude words with digits, currency symbols and so on - local exclude_words_re = rspamd_re.create_cached([[/^(?:\d+|\d+\D{1,3}|\p{Sc}.*|(\+?\d{1,3}[\s\-]?)?)$/u]]) + local exclude_words_re = rspamd_re.create_cached([=[/^(?:\d+|\d+\D{1,3}|\p{Sc}.*|(\+?\d{1,3}[\s\-]?)?)$/(:?^[[:alpha:]]*\d{4,}.*$)/u]=]) local newline_s = newline(task) local state = { newline_s = newline_s @@ -1120,9 +1120,9 @@ exports.anonymize_message = function(task, settings) end -- Construct new message - table.insert(text_content, '\nurls: ') + table.insert(text_content, '\nurls:') table.insert(text_content, table.concat(lua_util.keys(urls), ', ')) - table.insert(text_content, '\nemails: ') + table.insert(text_content, '\nemails:') table.insert(text_content, table.concat(lua_util.keys(emails), ', ')) local new_text = table.concat(text_content, ' ') -- cgit v1.2.3