djangosnippets.org: Latest snippets tagged with 'wbr'https://djangosnippets.org/tags/wbr/2008-04-03T10:18:51.562026-05:00Soft-wrap long lines
2008-04-03T10:18:51.562026-05:00Ubercorehttps://djangosnippets.org/snippets/680/<p>This filter naively parses HTML content, and inserts <wbr/> tags in lines with unbroken strings longer than max_line_length characters. It leaves content inside tags alone, so that things like urls are unaltered. XHTML entities are treated as atomic, and whitespace is determined with a regex. </p>
<p>It assumes well formed HTML.</p>
Freely redistributable