I have a problem with a twig variable with a filter inside a data- attribute in order to pass some content into a bootstrap modal. The problem is the filter obfuscateEmail which changes the content of the variable: https://github.com/Propaganistas/Email-Obfuscator#twig
My code:
{% for i in 1..20 %}
<a data-content="{{ _context['content_' ~ i ~ '_raw']|obfuscateEmail }}" data-toggle="modal" href="#modal" class="btn btn-primary">...</a>
{% endfor %}
I already tried to escape it without any success. The problem is always the same either the html code is wrong because of quotes inside the variable coming from the obfuscateEmail filter or the modal wont work or displays pure html.