From f65e145bc3204b7eca5d74a07d62ed3bd3262896 Mon Sep 17 00:00:00 2001 From: topkecleon Date: Sun, 14 Feb 2016 03:40:54 -0500 Subject: [PATCH] Fixed irresponsiveness in gSearch.lua when dealing with CJK characters. Resolved issue #34. Result title truncation was screwing with CJK encoding. Will rely on Telegram's built-in link truncation for now. --- plugins/gSearch.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/gSearch.lua b/plugins/gSearch.lua index a20a14b..23f9c2b 100755 --- a/plugins/gSearch.lua +++ b/plugins/gSearch.lua @@ -57,9 +57,11 @@ local action = function(msg) local output = '*Google results for* _' .. input .. '_ *:*\n' for i,v in ipairs(jdat.responseData.results) do local title = jdat.responseData.results[i].titleNoFormatting:gsub('%[.+%]', ''):gsub('&', '&') +--[[ if title:len() > 48 then title = title:sub(1, 45) .. '...' end +]]-- local url = jdat.responseData.results[i].unescapedUrl if url:find('%)') then output = output .. '• ' .. title .. '\n' .. url:gsub('_', '\\_') .. '\n'