1👍
You could try something like this: Replace by {% video %} in your filter. Get the output string and enter it as input value of “safe” filter. For example:
{% with html_string=different_markdown|your_filter %}
{{html_string|safe }}
{% endwith %}
Source:stackexchange.com