Pier Angelo Vendrame pushed to branch base-browser-140.1.0esr-15.0-1 at The Tor 
Project / Applications / Tor Browser


Commits:
39cb7bae by Pier Angelo Vendrame at 2025-08-11T15:13:28+02:00
fixup! BB 40925: Implemented the Security Level component

BB 43785: Fix DDG HTML in Safest.

During the rebases, we broke the automatic redirects to the HTML
version of DuckDuckGo. This commit fixes them.

- - - - -


1 changed file:

- toolkit/components/search/SearchEngine.sys.mjs


Changes:

=====================================
toolkit/components/search/SearchEngine.sys.mjs
=====================================
@@ -359,18 +359,20 @@ export class EngineURL {
       lazy.SecurityLevelPrefs?.securityLevel === "safest" &&
       this.type === lazy.SearchUtils.URL_TYPE.SEARCH
     ) {
-      let host = this.templateHost;
+      let host = templateURI.host;
       try {
         host = Services.eTLD.getBaseDomainFromHost(host);
       } catch (ex) {
         lazy.logConsole.warn("Failed to get a FPD", ex, host);
       }
-      if (
-        host === "duckduckgo.com" ||
+      if (host === "duckduckgo.com") {
+        templateURI.host = "html.duckduckgo.com";
+        templateURI.pathname = "/html";
+      } else if (
         host ===
-          "duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion"
+        "duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion"
       ) {
-        query += "html";
+        templateURI.pathname = "/html";
       }
     }
 



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/39cb7bae7db05720eaaf542491d787adedb65e88

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/39cb7bae7db05720eaaf542491d787adedb65e88
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tor-commits mailing list -- tor-commits@lists.torproject.org
To unsubscribe send an email to tor-commits-le...@lists.torproject.org

Reply via email to