searxng/searx
Martin Fischer 244ffef315 [help] substitute variables with string.Template
Previously help pages could link to instance-specific pages
with e.g. [search engines][url_for:preferences] which was
possible because searx.user_help was prefixing the Markdown:

[url_for:preferences]: /preferences

There are two problems with this:

1. typos in the Markdown files could go by unnoticed
   (since Markdown treats [foo][doesntexist] as regular text)

2. it doesn't let Markdown append their own query string
   (which would however be handy to link example search
    queries to the search page)

This commit addresses both of these problems by using
string.Template from the Python standard library.

Why don't we use Jinja2 for this? Well Jinja2 would be overkill.
We don't need any logic in the user documentation. And in the future
we might outsource the user documentation translation to Weblate,
in which case not permitting any logic in them is more secure.
2022-02-05 10:35:32 +01:00
..
answerers [fix] issue reported by pylint 22.1.0 2022-02-04 09:45:35 +01:00
data Merge pull request #852 from searxng/update_data_update_ahmia_blacklist.py 2022-02-01 06:52:57 +00:00
engines [pylint] engines/invidious.py 2022-02-04 15:42:06 +01:00
help/en [help] substitute variables with string.Template 2022-02-05 10:35:32 +01:00
metrics [enh] settings.yml: implement general.enable_metrics 2022-01-05 19:03:04 +01:00
network [mod] remove deprecate code 2022-01-29 08:54:12 +01:00
plugins [enh] limiter plugin 2022-02-02 09:15:59 +01:00
search [enh] implement a OnlineUrlSearchProcessor 2022-01-30 16:05:08 +01:00
shared [pyright:strict] searx.search.checker.background 2022-01-27 22:07:12 +01:00
static Merge pull request #848 from not-my-profile/help-route 2022-02-05 08:52:19 +01:00
templates Merge pull request #848 from not-my-profile/help-route 2022-02-05 08:52:19 +01:00
translations [translations] update from Weblate 2022-02-04 07:14:12 +00:00
__init__.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
autocomplete.py [fix] brave autocompleter: charset_normalizer issues 2022-01-23 17:22:13 +01:00
exceptions.py [pyright:strict] searx.search.checker.background 2022-01-27 22:07:12 +01:00
external_bang.py [fix] external bangs: don't overwrite Bangs in data trie 2022-01-12 19:37:13 +01:00
external_urls.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
flaskfix.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
languages.py Update searx.data - update_languages.py 2022-01-01 18:37:35 +01:00
locales.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
preferences.py [fix] make BooleanChoices only set cookies that vary from the default 2022-01-13 19:43:49 +01:00
query.py [fix] remove broken ? search operator 2022-01-06 14:10:58 +01:00
results.py [typing] add results.UnresponsiveEngine 2022-01-17 11:42:48 +01:00
settings.yml [fix] invidious engine: store random base_url in param 2022-02-04 15:42:06 +01:00
settings_defaults.py [enh] limiter plugin 2022-02-02 09:15:59 +01:00
settings_loader.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
unixthreadname.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
user_help.py [help] substitute variables with string.Template 2022-02-05 10:35:32 +01:00
utils.py [mod] searx.utils: more typing 2022-01-30 22:14:12 +01:00
version.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
webadapter.py [fix] disabling all engines in a category makes the bang search in general 2022-01-03 20:23:46 +01:00
webapp.py [enh] generate navigation for help pages 2022-02-01 06:29:22 +01:00
webutils.py [enh] change categories_as_tabs from a list to a dict 2022-01-05 11:03:44 +01:00