mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
[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
This commit is contained in:
parent
28dc623785
commit
0b832f19bf
11 changed files with 25 additions and 26 deletions
|
@ -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 <br/> instead of |, but html tags are verboten
|
||||
content = content.strip().replace('\n', ' | ')
|
||||
content = ' '.join(content.split())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue