Using Python, how can I take a string with an unformatted link like this:
str = "<p>Here's some safe html with a link to somewhere: \
https://google.ca but there might also be some images <img \
src='https://commons.wikimedia.org/wiki/File:Man-in-circle_icon.svg' /> \
and other linky looking things</p>"
And wrap it in tags like this:
str = "<p>Here's some safe html with a link to somewhere: \
<a href='https://google.ca' target='_blank'>https://google.ca</a> but there might also be some images <img \
src='https://commons.wikimedia.org/wiki/File:Man-in-circle_icon.svg' /> \
and other linky looking things</p>"