diff --git a/adhocracy4/ckeditor/templatetags/ckeditor_tags.py b/adhocracy4/ckeditor/templatetags/ckeditor_tags.py index f76d4b39e..6548e311a 100644 --- a/adhocracy4/ckeditor/templatetags/ckeditor_tags.py +++ b/adhocracy4/ckeditor/templatetags/ckeditor_tags.py @@ -1,3 +1,4 @@ +import re import time from django import template @@ -45,3 +46,9 @@ def transform_collapsibles(text): ) return serialize(tree) + + +@register.filter +def disable_iframes(text): + """Disable all iframes to prevent them from loading if js is disabled""" + return re.sub(r"(