From: Vsevolod Stakhov Date: Mon, 17 Jun 2019 16:45:00 +0000 (+0100) Subject: [Minor] Clickhouse: Fix escaping X-Git-Tag: 2.0~766 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fd8fa3e700f834c758cc673cc34b2f9c44a9e5d2;p=rspamd.git [Minor] Clickhouse: Fix escaping --- diff --git a/lualib/lua_clickhouse.lua b/lualib/lua_clickhouse.lua index 1aca0f719..ad5b51dce 100644 --- a/lualib/lua_clickhouse.lua +++ b/lualib/lua_clickhouse.lua @@ -45,10 +45,10 @@ end local function clickhouse_quote(str) if str then return str:gsub('[\'\\\n\t]', { - ['\''] = '\\\'', - ['\\'] = '\\', - ['\n'] = '\\n', - ['\t'] = '\\t' + ['\''] = [[\']], + ['\\'] = [[\\]], + ['\n'] = [[\n]], + ['\t'] = [[\t]], }):lower() end