From 2f63f918e7300e809ae0800aa79a30c79e4a148c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 14 Sep 2020 14:32:23 +0300 Subject: when looking up words, strip hyphens --- backend.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index 4ed612b..a5dc56e 100644 --- a/backend.php +++ b/backend.php @@ -244,7 +244,10 @@ if (defined('DICT_ENABLED') && DICT_ENABLED) { - $word = escapeshellarg($_REQUEST["word"]); + /* strip hyphens */ + $word = str_replace("­", "", $_REQUEST["word"]); + + $word = escapeshellarg($word); exec(DICT_CLIENT . " -h ". DICT_SERVER ." $word 2>&1", $output, $rc); -- cgit v1.2.3