djangosnippets.org: Latest snippets tagged with 'shorttag'https://djangosnippets.org/tags/shorttag/2008-04-22T14:20:18.030193-05:00Convert XHTML-compatible shorttag to HTML-compatible tag.
2008-04-22T14:20:18.030193-05:00clamothehttps://djangosnippets.org/snippets/716/<p>This filter converts a XHTML-compatible shorttag <code><input ... /></code> to a HTML4-compatible tag <code><input ...></code>.</p>
<p>Example:</p>
<p><code>{% for field in form %}
<dt>{{ field.label_tag }}</dt>
<dd>
{{ field.errors }}
{{ field|remove_shorttag }}
</dd>
{% endfor %}</code></p>
<p>This will produce html4-compatible output, opposed to newform's normal XHTML output.</p>
Freely redistributable