Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-13.0-1 at The Tor 
Project / Applications / Tor Browser


Commits:
5db35e85 by cypherpunks1 at 2023-06-08T23:51:40-08:00
fixup! Bug 40925: Implemented the Security Level component

Bug 26277: Skip the redirection page when searching with DuckDuckGo on the 
safest security level

- - - - -


1 changed file:

- toolkit/components/search/SearchEngine.jsm


Changes:

=====================================
toolkit/components/search/SearchEngine.jsm
=====================================
@@ -30,6 +30,12 @@ XPCOMUtils.defineLazyGetter(this, "logConsole", () => {
   });
 });
 
+XPCOMUtils.defineLazyScriptGetter(
+  this,
+  "SecurityLevelPrefs",
+  "chrome://browser/content/securitylevel/securityLevel.js"
+);
+
 const USER_DEFINED = "searchTerms";
 
 // Supported OpenSearch parameters
@@ -429,7 +435,17 @@ class EngineURL {
   }
 
   getSubmission(searchTerms, engine, purpose) {
-    var url = ParamSubstitution(this.template, searchTerms, engine);
+    let urlTemplate = this.template;
+    if (
+      engine &&
+      (engine._extensionID === "[email protected]" ||
+        engine._extensionID === "[email protected]") &&
+      this.type === SearchUtils.URL_TYPE.SEARCH &&
+      SecurityLevelPrefs?.securityLevel === "safest"
+    ) {
+      urlTemplate += "html";
+    }
+    var url = ParamSubstitution(urlTemplate, searchTerms, engine);
     // Default to searchbar if the purpose is not provided
     var requestPurpose = purpose || "searchbar";
 



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

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


_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to