mirror of
https://github.com/koreader/koreader
synced 2024-11-11 19:11:14 +00:00
escape quotes and other funny characters in word when popening sdcv
This commit is contained in:
parent
1a23787e26
commit
390135d02d
@ -39,7 +39,8 @@ end
|
||||
function ReaderDictionary:stardictLookup(word)
|
||||
DEBUG("lookup word:", word)
|
||||
if word then
|
||||
local std_out = io.popen("./sdcv -nj "..'\"'..word..'\"', "r")
|
||||
-- escape quotes and other funny characters in word
|
||||
local std_out = io.popen("./sdcv -nj "..("%q"):format(word), "r")
|
||||
local results_str = std_out:read("*all")
|
||||
if results_str then
|
||||
--DEBUG("result str:", word, results_str)
|
||||
|
Loading…
Reference in New Issue
Block a user