summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2023-12-11 00:41:36 +0100
committerrodarima <rodarima@gmail.com>2023-12-17 20:42:39 +0100
commitb4f638bb6b38a646dd9e9bd035049361477a3120 (patch)
treea6196de26c7b115644c5a96690af09a6288b160a
parent3e00bcbe563418be7322795bf72076dfe313817f (diff)
Fix DuckDuckGo search links
The DuckDuckGo service that redirects the links from the search page is returning a broken page for non-javascript browsers. They have a meta refresh tag in the body, instead of in the head. Adding the kd=-1 argument causes the DuckDuckGo search results to point directly to the target page avoiding the redirection. Based on this patch: https://salsa.debian.org/debian/dillo/-/commit/ffbd4fc0e6cf94b3947d02766224c0e80344a017 Thanks: liftof+dbug@gmail.com Thanks: Axel Beckert <abe@debian.org> Bug-Debian: https://bugs.debian/org/924357
-rw-r--r--ChangeLog2
-rw-r--r--dillorc2
-rw-r--r--doc/user_help.html2
-rw-r--r--src/prefs.c2
4 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4cf9539b..bbd69dae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,8 @@ dillo-3.1 [not released yet]
+- Fix bookmarks DPI crash.
- Fix OSX compilation issue with xembed.
Patches: Johannes Hofmann
++- Fix DuckDuckGo search links
+ Patches: Rodrigo Arias Mallo <rodarima@gmail.com>
-----------------------------------------------------------------------------
diff --git a/dillorc b/dillorc
index e2322a3a..caf1ca04 100644
--- a/dillorc
+++ b/dillorc
@@ -157,7 +157,7 @@
# You can enable multiple search_url strings at once and select from among
# them at runtime, with the first being the default.
# (the prefix serves to search from the Location Bar. e.g. "dd dillo image")
-search_url="dd DuckDuckGo (https) https://duckduckgo.com/lite/?kp=-1&q=%s"
+search_url="dd DuckDuckGo (https) https://duckduckgo.com/lite/?kp=-1&kd=-1&q=%s"
search_url="Wikipedia http://www.wikipedia.org/w/index.php?search=%s&go=Go"
search_url="Free Dictionary http://www.thefreedictionary.com/%s"
search_url="Startpage (https) https://www.startpage.com/do/search?query=%s"
diff --git a/doc/user_help.html b/doc/user_help.html
index 88218f70..789a0b5f 100644
--- a/doc/user_help.html
+++ b/doc/user_help.html
@@ -314,7 +314,7 @@
<p>
Example, in dillorc:<br>
<blockquote>
- <code>search_url="dd Duckduckgo http://duckduckgo.com/lite/?kp=-1&amp;q=%s"</code>
+ <code>search_url="dd Duckduckgo http://duckduckgo.com/lite/?kp=-1&amp;kd=-1&amp;q=%s"</code>
</blockquote>
means you can reach the location bar (CTRL+L), then type:
<blockquote>
diff --git a/src/prefs.c b/src/prefs.c
index 59590356..67816acb 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -18,7 +18,7 @@
#define PREFS_FONT_CURSIVE "URW Chancery L"
#define PREFS_FONT_FANTASY "DejaVu Sans" /* TODO: find good default */
#define PREFS_FONT_MONOSPACE "DejaVu Sans Mono"
-#define PREFS_SEARCH_URL "dd http://duckduckgo.com/lite/?kp=-1&q=%s"
+#define PREFS_SEARCH_URL "dd http://duckduckgo.com/lite/?kp=-1&kd=-1&q=%s"
#define PREFS_NO_PROXY "localhost 127.0.0.1"
#define PREFS_SAVE_DIR "/tmp/"
#define PREFS_HTTP_REFERER "host"