Use twigs builtin filter to inline data urls, instead of a custom one.

This commit is contained in:
Jan Böhmer 2020-05-07 23:35:20 +02:00
parent f64910374f
commit d8adc26b03
8 changed files with 83 additions and 66 deletions

View file

@ -45,7 +45,7 @@
{% block additional_content %}
{% if pdf_data is defined and pdf_data is not empty %}
<div class="card mt-2 mb-2 p-1 border-secondary" style="resize: vertical; overflow: scroll; height: 250px;">
<object id="pdf_preview" data="{{ inlineData(pdf_data, 'application/pdf') | escape('html_attr') }}"style="height: inherit">
<object id="pdf_preview" data="{{ pdf_data | data_uri(mime='application/pdf') }}"style="height: inherit">
</object>
</div>
{% endif %}