Closed callmiy closed 9 years ago
The easiest fix is to minify content after the template has been parsed. Simply because the template itself does not represent valid HTML which the Domparser
of htmlparser2
can parse. The only way to fix this would be to create a custom domparser or rather django-domparser in this case.
Thanks @Swaagie. I actually got it working by changing my markup to look like this
<input type="checkbox" disabled="{% if not conts %}true{% endif %}">
That makes sense, thanks for replying :)
I have in my django template:
<input type="checkbox" {% if not conts %}disabled="true"{% endif %}>
and when minified, I get:
<input type=checkbox {%="" if="" not="" conts="" %}disabled=true endif="" %}="">
I have set "quotes" to false, but still get same output. How do I fix this?