Project

General

Profile

Actions

Bug #535

closed

Search query operator not supported, affects Startpage.com

Added by GNU User about 4 years ago. Updated 9 months ago.

Status:
Closed
Priority:
3.x
Start date:
03/17/2020
Due date:
% Done:

0%

Estimated time:

Description

When I try to use custom settings for startpage in "Search" settings, I cannot get it to work. I approached Startpage for help, and they sent me this email detailing the process:


"If you would like to apply your custom Startpage settings to our query URL, please
follow these steps:

1) Navigate to the Startpage settings: https://www.startpage.com/search/settings
2) Select the preferences you would like to use and copy one of the two settings
URLs at the bottom of the page
3) From the settings URL, copy the remainder of the URL after the question mark, for
example:
prfe=36c84513558a2d34bf0d89ea505333ad9c86bd6598735d590c1c89932309a9bc971ed4e94bb93cd3745625d261b6aec0
4) Paste that at the end of our query URL
(https://www.startpage.com/do/dsearch?query=%s), starting with a '&' symbol.
5) Using the example settings URL mentioned in step 3, your customized query URL
would look like this:
https://www.startpage.com/do/dsearch?query=%s&prfe=36c84513558a2d34bf0d89ea505333ad9c86bd6598735d590c1c89932309a9bc971ed4e94bb93cd3745625d261b6aec0

If you use this customized query URL when adding Startpage as a search engine, your
custom Startpage settings will always be used (without the need of the settings
cookie).

I hope this helps. Please let us know if you have any additional questions."


It doesn't work however, because apparently Privacy Browser doesn't support the "%s" operator for searches.

Not sure if it counts as a bug or a feature request... But given that it's a search operator used by other sites as well, I am counting this as a bug. Please correct me if I am wrong.
Thanks.

Actions #1

Updated by Soren Stoutner about 4 years ago

  • Status changed from New to Closed
  • Assignee set to Soren Stoutner

You just have to adjust the URL and it will work.

The `%s` in `query=%s` is a placeholder for the search terms. So, if you are searching for the word `test`, it needs to turn into `query=test`.

Privacy Browser expects that your search URL will end with the `=`, and it adds the search terms after that. So, if you adjust the URL to be the following it will work:

https://www.startpage.com/do/dsearch?prfe=36c84513558a2d34bf0d89ea505333ad9c86bd6598735d590c1c89932309a9bc971ed4e94bb93cd3745625d261b6aec0&query=

The key to this is that the HTTP spec does not care about the order the values after the `?`.

Actions #2

Updated by GNU User about 4 years ago

Ok, that works. Thanks.
But for the record, does Privacy Browser support placeholders?
I ask this because I would like to use bookmarklets with Privacy Browser, and I assume such use case would require it.

Actions #3

Updated by Soren Stoutner about 4 years ago

Are you aware of any browser that modifies bookmark URLs when they are loaded?

Actions #4

Updated by GNU User about 4 years ago

I am not sure if I understand your question, but here is an example: https://en.wikipedia.org/wiki/Help:Using_the_Wayback_Machine#JavaScript_bookmarklet

Basically www.bookmark.ext/ENTER_CURRENT_URL

Actions #5

Updated by Soren Stoutner about 4 years ago

As you can see from the examples listed in the WayBack Machine, this is using JavaScript in a bookmark which is being evaluated by the browser every time the bookmark is opened. Given the dangers of JavaScript as documented in the Guide inside the app and in multiple places on Stoutner.com, I would estimate there is a 0% chance I would ever enable JavaScript for processing bookmarks.

Actions #6

Updated by GNU User about 4 years ago

It's exactly because I don't want to use JS from webpages that I would prefer to have these bookmarklets. While this is JS, it's something I can take, evaluate, and choose to use. The code in the bookmarklet will always be the same, unlike a webpage that today might be running a piece of code and another one tomorrow.

Of course, I am unsure if it would be possible to run JS from the bookmarks while denying it on webpages. But if it is possible, it should at least be considered.

Actions #7

Updated by Soren Stoutner about 4 years ago

The JavaScript in these bookmarks is being evaluated in the context of the current website. That is how they pass the URL of the current website to the WayBack Machine.

I cannot think of any way you could implement this that wouldn't turn into a gaping privacy vulnerability.

Actions #8

Updated by ask low 9 months ago

https://www.google.com/search?query=%s&gbv=1&query= still doesn't work. I don't understand your query thing.

Actions #9

Updated by ask low 9 months ago

https://www.google.com/search?q=&query=%s&gbv=1&query= didn't work too.

Actions #10

Updated by ask low 9 months ago

https://www.google.com/gbv=1&search?q= didn't work either.

Actions #11

Updated by Soren Stoutner 9 months ago

The custom search engine syntax is described at https://www.stoutner.com/search-engine-syntax/.

Google's base search syntax is https://www.google.com/search?q=. If you want to add other query strings, they need to be listed before the final q= and should be separated by a &, like https://www.google.com/search?gbv=1&q=

Actions

Also available in: Atom PDF