I'd like to use Django's urlize function together with django-markwhat's CommonMark filter.
I'm imagining something like this:
{{ "http://example.com"|urlize|commonmark }}
Which outputs <p><a href="http://example.com">http://example.com</a></p>
. The issue here is that URLs already marked up in commonmark, like <http://example.com>
, will get rendered with angled brackets around them.
If I apply urlize
after commonmark
, like this:
{{ "http://example.com"|commonmark|urlize }}
The urlize
function doesn't detect the url in <p>http://example.com</p>
(and it's mentioned in the urlize
docs that it won't work as expected for html input).
I haven't come up with a solution yet, so let me know if you have any ideas.
http://example.com
>`