3 Commits

Author SHA1 Message Date
Aadniz
4ca75a0450 [fix] engine qwant - return forbidden instead of showing parse error (#5377) 2025-10-25 13:43:37 +02:00
Bnyro
50a4c653dc [build] /static 2025-10-25 10:00:28 +02:00
Bnyro
b7f9b489c9 [fix] search bar: cursor jumps to beginning when clicking text field
Apparently, setting padding on an input field and then clicking that
space created by the padding forces the seekbar cursor to jump to the
beginning of the input field instead of the actual text position.

By removing that padding, the search bar input automatically claims that
height for itself and thus clicking on the blank space moves the cursor to
the correct position.

closes https://github.com/searxng/searxng/issues/5371
2025-10-25 10:00:28 +02:00
5 changed files with 24 additions and 5 deletions

View File

@@ -271,6 +271,7 @@
}
],
"license": "MIT",
"peer": true,
"engines": {
"node": ">=18"
},
@@ -294,6 +295,7 @@
}
],
"license": "MIT",
"peer": true,
"engines": {
"node": ">=18"
}
@@ -1415,6 +1417,7 @@
"integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"undici-types": "~7.16.0"
}
@@ -1582,6 +1585,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.19",
"caniuse-lite": "^1.0.30001751",
@@ -2674,6 +2678,7 @@
"integrity": "sha512-h0Un1ieD+HUrzBH6dJXhod3ifSghk5Hw/2Y4/KHBziPlZecrFyE9YOTPU6eOs0V9pYl8gOs86fkr/KN8lUX39A==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@keyv/serialize": "^1.1.1"
}
@@ -2707,6 +2712,7 @@
"integrity": "sha512-j1n1IuTX1VQjIy3tT7cyGbX7nvQOsFLoIqobZv4ttI5axP923gA44zUj6miiA6R5Aoms4sEGVIIcucXUbRI14g==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"dependencies": {
"copy-anything": "^2.0.1",
"parse-node-version": "^1.0.1",
@@ -3321,6 +3327,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
@@ -3383,6 +3390,7 @@
"integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
@@ -3894,6 +3902,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"@csstools/css-parser-algorithms": "^3.0.5",
"@csstools/css-tokenizer": "^3.0.4",
@@ -4179,6 +4188,7 @@
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
"peer": true,
"engines": {
"node": ">=12"
},
@@ -4219,6 +4229,7 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -4383,6 +4394,7 @@
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
"peer": true,
"engines": {
"node": ">=12"
},

View File

@@ -178,7 +178,6 @@ html.no-js #clear_search.hide_if_nojs {
#send_search {
display: block;
margin: 0;
padding: 0.8rem;
background: none repeat scroll 0 0 var(--color-search-background);
border: none;
outline: none;
@@ -196,6 +195,7 @@ html.no-js #clear_search.hide_if_nojs {
#send_search {
.ltr-rounded-right-corners(0.8rem);
padding: 0.8rem;
&:hover {
cursor: pointer;

View File

@@ -53,6 +53,7 @@ from searx.exceptions import (
SearxEngineAPIException,
SearxEngineTooManyRequestsException,
SearxEngineCaptchaException,
SearxEngineAccessDeniedException,
)
from searx.network import raise_for_httperror
from searx.enginelib.traits import EngineTraits
@@ -184,8 +185,12 @@ def parse_web_api(resp):
results = []
# load JSON result
search_results = loads(resp.text)
# Try to load JSON result
try:
search_results = loads(resp.text)
except ValueError:
search_results = {}
data = search_results.get('data', {})
# check for an API error
@@ -195,6 +200,8 @@ def parse_web_api(resp):
raise SearxEngineTooManyRequestsException()
if search_results.get("data", {}).get("error_data", {}).get("captchaUrl") is not None:
raise SearxEngineCaptchaException()
if resp.status_code == 403:
raise SearxEngineAccessDeniedException()
msg = ",".join(data.get('message', ['unknown']))
raise SearxEngineAPIException(f"{msg} ({error_code})")

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long