From 0b832f19bf6590f099c572686d847db7cf7487e9 Mon Sep 17 00:00:00 2001 From: Grant Lanham Date: Tue, 10 Sep 2024 21:44:30 -0400 Subject: [fix] Removes ``/>`` ending tags for void HTML elements Removes ``/>`` ending tags for void elements [1] and replaces them with ``>``. Part of the larger cleanup to cleanup invalid HTML throughout the codebase [2]. [1] https://html.spec.whatwg.org/multipage/syntax.html#void-elements [2] https://github.com/searxng/searxng/issues/3793 --- searx/engines/btdigg.py | 1 - 1 file changed, 1 deletion(-) (limited to 'searx/engines') diff --git a/searx/engines/btdigg.py b/searx/engines/btdigg.py index 193785182..5743f4142 100644 --- a/searx/engines/btdigg.py +++ b/searx/engines/btdigg.py @@ -54,7 +54,6 @@ def response(resp): excerpt = result.xpath('.//div[@class="torrent_excerpt"]')[0] content = html.tostring(excerpt, encoding='unicode', method='text', with_tail=False) - # it is better to emit
instead of |, but html tags are verboten content = content.strip().replace('\n', ' | ') content = ' '.join(content.split()) -- cgit v1.2.3