mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
fixes #47
This commit is contained in:
parent
a77de0c883
commit
03884aa534
1 changed files with 3 additions and 0 deletions
|
@ -193,6 +193,9 @@ def allowlist_html(html: str) -> str:
|
|||
if tag.name == 'a':
|
||||
tag.attrs['rel'] = 'nofollow ugc'
|
||||
tag.attrs['target'] = '_blank'
|
||||
# Add loading=lazy to images
|
||||
if tag.name == 'img':
|
||||
tag.attrs['loading'] = 'lazy'
|
||||
|
||||
return str(soup)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue