From: Pavel Podkorytov Date: Sat, 21 May 2022 10:56:28 +0000 (+0500) Subject: [Minor] Add lower_utf8 selector transformation X-Git-Tag: 3.3~230^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=434c20235f6a6822cc079e5fc51bd359715251b5;p=thirdparty%2Frspamd.git [Minor] Add lower_utf8 selector transformation --- diff --git a/lualib/lua_selectors/transforms.lua b/lualib/lua_selectors/transforms.lua index 28ae2c3155..fc929175f6 100644 --- a/lualib/lua_selectors/transforms.lua +++ b/lualib/lua_selectors/transforms.lua @@ -40,6 +40,17 @@ local transform_function = { end, ['description'] = 'Returns the lowercased string', }, + -- Returns the lowercased utf8 string + ['lower_utf8'] = { + ['types'] = { + ['string'] = true, + }, + ['map_type'] = 'string', + ['process'] = function(inp, t) + return rspamd_util.lower_utf8(inp), t + end, + ['description'] = 'Returns the lowercased utf8 string', + }, -- Returns the first element ['first'] = { ['types'] = {