summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-14 14:32:23 +0300
committerAndrew Dolgov <[email protected]>2020-09-14 14:32:23 +0300
commit2f63f918e7300e809ae0800aa79a30c79e4a148c (patch)
treec3a5f21ecf34793cae9cb88c0f576b8eb6f3bc77 /backend.php
parent3e244fc9bb11cf88ca042b26d4242c8a9b69670d (diff)
when looking up words, strip hyphens
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php5
1 files changed, 4 insertions, 1 deletions
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);