diff --git a/uwsgi-python/templates/apps/protokollsystem.j2 b/uwsgi-python/templates/apps/protokollsystem.j2
index e15d1591366d0efea747cdccf7da9dc351dc095e..ed9024aadd727e08676db9e9ad1f0baae54754b0 100644
--- a/uwsgi-python/templates/apps/protokollsystem.j2
+++ b/uwsgi-python/templates/apps/protokollsystem.j2
@@ -40,7 +40,7 @@ URL_PARAMS = ""
 CDN_URL = "{{cdn_url}}"
 {% endif %}
 {% if protokolle_metadata_domain_whitelist is defined %}
-PERMITTED_METADATA_DOMAINS = [ {% for domain in protokolle_metadata_domain_whitelist %} "{{domain}}", {% endfor %} ]
+PERMITTED_METADATA_DOMAINS = [ {{protokolle_metadata_domain_whitelist|map('quote')|join(', ')}} ]
 {% endif %}
 
 PRINTING_ACTIVE = {{ protokolle_printing }}