-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mod] new preference: query_in_title #485
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest changing the line in results.html in both oscar and simple to (This way there is a space between the query and the -
like so: time - SearXNG
; right now the title looks like this in firefox: time- SearXNG
):
{% block title %}{% if query_in_title %}{{ q|e }} - {% endif %}{% endblock %}
- 👍 enabeling the setting in pref. in oscar and simple works
- 👍 disabeling the setting in pref. in oscar and simple works
- 👍 reseting the settings work
- 👎 enabeling query in title does NOT work through settings.yml (
query_in_title: true
in ui section; this is the case for both themes) - 👍 locking the setting in settings.yml works for both themes
8b8f244
to
49879a4
Compare
@unixfox : the default value is off. So the title will disappear from page's title when the instances are upgraded unless the user explicitly set the value to on. Possible better implementation:
|
More precisely, removing
I can't figure out why. Looking at the HTML page:
I don't see any issue. |
Also: Setting anything it the settings on the user device through the /preferences endpoint does not work anymore. It seems the POST request when pressing the save btn does not work anymore: Also the debug log:
|
* disable by default * settings.yml: ui.query_in_title * in /preferences: privacy tab when enabled, the result page's title contains the user query. previously: * oscar theme: the query was always included * simple theme: the query was included with the GET method
49879a4
to
80fb774
Compare
@mrpaulblack the issue you describe is exactly why the tests fail : I've added Line 409 in 80fb774
( image_proxy preference definition has the "workaround")
So now it should work. Perhaps with Firefox, the default value should be |
even wit the POST method ? It is off by default, see searx/settings_defaults.py |
Woow you are right; It does not log page title when using POST method with query in page title enabled mb... |
By default, for a Firefox user, this setting can be enabled when the method is POST, and disabled in all other cases. So as you said, it should be disabled by default. There are an inconsistent settings:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the inconsistency in settings.yml is fine; since its the only privacy setting from the theme in settings.yml and still kinda fits into that category (if there are more privacy items we should probably think about adding the category to settings.yml...). I also retested and everything works now 👍 (settings.yml change in simple and oscar and also changing in /pref. in simple and oscar).... The only thing I would change is to add a space after the query and before the -
:
(But dont know how and its not that important if not tbh)
Suggested-by: @unixfox searxng#485 (comment) Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Discussion moved to #560 |
What does this PR do?
when enabled, the result page's title contains the user query.
previously:
Why is this change important?
Some browser records the page history using the HTML title pages.
See #434 (comment)
How to test this PR locally?
With the simple and oscar themes:
ui.query_in_title: true
lock: - query_in_title
/preferences
: check the option has disappeared.Author's checklist
Related issues
Related to #434