mintchaos / typogrify

A set of Django template filters to make caring about typography on the web a bit easier.
http://static.mintchaos.com/projects/typogrify/
Other
168 stars 29 forks source link

& in <title> gets wrapped in <span class="amp"></span> #48

Closed Anteru closed 4 years ago

Anteru commented 7 years ago

The title says it all - typogrify mangles a title element like <title>A & B</title> into <title>A <span class="amp">&</span> B</title>, which unfortunately ends up being shown as "A &" by the browser.

justinmayer commented 4 years ago

The most expedient way to solve this is to filter at the template level, e.g., using the Jinja2 striptags filter.