forked from MarseyWorld/MarseyWorld
parent
1af6a283b7
commit
9cd9ff943e
|
@ -889,12 +889,6 @@ approved_embed_hosts = [
|
|||
'i.ytimg.com/vi',
|
||||
]
|
||||
|
||||
approved_embed_hosts_domains = []
|
||||
for h in approved_embed_hosts:
|
||||
domain = tldextract.extract(h).registered_domain
|
||||
if domain not in approved_embed_hosts_domains:
|
||||
approved_embed_hosts_domains.append(domain)
|
||||
|
||||
if SITE_IMAGES not in approved_embed_hosts:
|
||||
approved_embed_hosts = [SITE_IMAGES] + approved_embed_hosts
|
||||
|
||||
|
|
|
@ -376,7 +376,7 @@ def mutes(v):
|
|||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def formatting(v):
|
||||
return render_template("formatting.html", v=v, allowed_tags=allowed_tags, allowed_styles=allowed_styles, approved_embed_hosts_domains=approved_embed_hosts_domains)
|
||||
return render_template("formatting.html", v=v, allowed_tags=allowed_tags, allowed_styles=allowed_styles)
|
||||
|
||||
@app.get("/app")
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
|
|
|
@ -456,7 +456,7 @@ And we allow custom HTML in most places:
|
|||
Image files, video files, and audio files from these sources will get embedded automatically:
|
||||
|
||||
<ul class="mt-3">
|
||||
{% for host in approved_embed_hosts_domains %}
|
||||
{% for host in approved_embed_hosts %}
|
||||
<li>{{host}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue