From b4f638bb6b38a646dd9e9bd035049361477a3120 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 11 Dec 2023 00:41:36 +0100 Subject: 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 Bug-Debian: https://bugs.debian/org/924357 --- ChangeLog | 2 ++ dillorc | 2 +- doc/user_help.html | 2 +- src/prefs.c | 2 +- 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 ----------------------------------------------------------------------------- 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 @@

Example, in dillorc:

- search_url="dd Duckduckgo http://duckduckgo.com/lite/?kp=-1&q=%s" + search_url="dd Duckduckgo http://duckduckgo.com/lite/?kp=-1&kd=-1&q=%s"
means you can reach the location bar (CTRL+L), then type:
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" -- cgit v1.2.3