summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-08-30 17:50:42 +0200
committertv <tv@krebsco.de>2017-08-30 17:50:42 +0200
commitbeeca40313f68874e05568f4041423c16202e9da (patch)
treedc68738158f508da65dff757b14a79622cdfe547
parent607199cc67f143387d34e43851b9031082dfd29c (diff)
urlencode all parametersv1.1.0ni/master
-rwxr-xr-xdic15
1 files changed, 12 insertions, 3 deletions
diff --git a/dic b/dic
index 8588998..565de37 100755
--- a/dic
+++ b/dic
@@ -1,7 +1,6 @@
#! /bin/sh
# usage: dic [--lang=LANG] WORD...
# where LANG may be one of en, fr, es, it, ch, ru, pt, pl
-# multiple WORDs may be seperated by + like this: multiple+words
set -euf
main() {
@@ -26,8 +25,18 @@ main() {
}
GET() {
- curl -sS -b 'LEOABTEST=T; browser=webkit%3B5%3Bajax' \
- "https://dict.leo.org/dictQuery/m-vocab/$lp/query.xml?tolerMode=nof&lp=$lp&lang=$lang&rmWords=off&rmSearch=on&search=$search&searchLoc=0&resultOrder=basic&multiwordShowSingle=on"
+ curl -GsS \
+ -b 'LEOABTEST=T; browser=webkit%3B5%3Bajax' \
+ --data-urlencode lang="$lang" \
+ --data-urlencode lp="$lp" \
+ --data-urlencode multiwordShowSingle=on \
+ --data-urlencode resultOrder=basic \
+ --data-urlencode rmSearch=on \
+ --data-urlencode rmWords=off \
+ --data-urlencode searchLoc=0 \
+ --data-urlencode search="$search" \
+ --data-urlencode tolerMode=nof \
+ "https://dict.leo.org/dictQuery/m-vocab/$lp/query.xml"
}
simplify() {