pallets / jinja

A very fast and expressive template engine.
https://jinja.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
10.28k stars 1.61k forks source link

urlize support for quotes #1945

Open 0xhtml opened 6 months ago

0xhtml commented 6 months ago

I would benefit from there being an option to add quotes to the punctuation ignored by urllize, such that, e.g., lorem ipsum 'example.org'. gets converted to lorem ipsum '<a href=https://example.org>example.org</a>'..

I coded a ruff example implementation that allows configuration of the stripped characters through policies: https://github.com/pallets/jinja/commit/19817a6b7fff6159e28e962deb06109545987d87