In its previous implementation, the macro ``checkbox_onoff_reversed`` always
created an ``aria-labelledby`` attribute, even if there was no descriptive tag
with the generated ID (used as the value of the ``aria-labelledby``).
Before this patch, the Nu-HTML-Checker [1] reported 255 issues of this type::
The aria-labelledby attribute must point to an element in the same document. (255)
[1] https://validator.w3.org/nu/
Signed-off-by: Markus <markus@venom.fritz.box>
The ``aria-labelledby`` [1] attribute identifies the element that labels the
element it is applied to. The templates ``infinite_scroll.html`` and
``search_on_category_select.html`` define a ``aria-labelledby`` at the <input>
tag but miss the id in the <div> with the description.
[1] https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby
Signed-off-by: Markus <markus@venom.fritz.box>
So far a CAPTCHA was not recognized in the response of the qwant engine and a
SearxEngineAPIException was raised by mistake. With this patch a CAPTCHA
redirect is recognized and the correct SearxEngineCaptchaException is raised.
Closes: https://github.com/searxng/searxng/issues/3806
Signed-off-by: Markus <markus@venom.fritz.box>
This patch fixes a bug reported by CI "Fetch traits" [1] (brave) and improves
other fetch traits functions (google, annas_archive & radio_browser).
brave:
File "/home/runner/work/searxng/searxng/searx/engines/brave.py", line 434, in fetch_traits
sxng_tag = region_tag(babel.Locale.parse(ui_lang, sep='-'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/searxng/searxng/searx/locales.py", line 155, in region_tag
Error: raise ValueError('%s missed a territory')
google:
change ERROR message about unknow UI language to INFO message
radio_browser:
country_list contains duplicates that differ only in upper/lower case
annas_archive:
for better diff; sort the persistence of the traits
[1] https://github.com/searxng/searxng/actions/runs/10606312371/job/29433352518#step:6:41
Signed-off-by: Markus <markus@venom.fritz.box>
* [feat] engine: add right dao
* [enh] right dao engine: allow additional classes
Allow additional classes while parsing to prevent the engine from breaking in the future if additional classes are added to the elements.
Co-authored-by: Bnyro <bnyro@tutanota.com>
---------
Co-authored-by: Bnyro <bnyro@tutanota.com>
The user_agent attribute of the Flask request object is an instance of
the werkzeug.user_agent.UserAgent class.
This will fix the following error of the self_info plugin:
> ERROR:searx.plugins.self_info: Exception while calling post_search
> Traceback (most recent call last):
> File "searx/plugins/__init__.py", line 203, in call
> ret = getattr(plugin, plugin_type)(*args, **kwargs)
> File "searx/plugins/self_info.py", line 31, in post_search
> search.result_container.answers['user-agent'] = {'answer': gettext('Your user-agent is: ') + ua}
> TypeError: can only concatenate str (not "UserAgent") to str
We do not want to show the user-agent information from the duckduckgo
zero click info. This is the user-agent used by searxng and not the
user-agent used by the user.
This was already done for the IP address in:
0fb3f0e4ae
Changes made to tineye engine:
1. Importing logging if TYPE_CHECKING is enabled
2. Remove unecessary try-catch around json parsing the response, as this
masked the original error and had no immediate benefit
3. Improve error handling explicitely for status code 422 and 400
upfront, deferring json_parsing only for these status codes and
successful status codes
4. Unit test all new applicable changes to ensure compatability
You have to copy and paste the query without using the keyboard to replicate the
issue. As soon as you press the keyboard the cross appears. [1]
- [1] https://github.com/searxng/searxng/issues/3725#issuecomment-2282655272
Reported-by: @Immortality-IMT in [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
The successor is “hostname plugin” from PR:
- https://github.com/searxng/searxng/pull/3463
---
Revert "[refactor] hostnames plugin: add fallback for old hostname_replace plugin"
This reverts commit f5eb56b63f.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Google underlines words inside of answers that can be clicked to show
additional definitions. These definitions inside the answer were not
correctly handled and ended up in the middle of the answer text. With
this fix, the extra definitions are stripped from the answer shown by
the frontend.