I want to replace the <h1>
tag of a html page.
But the content of the heading can be HTML (not just a string).
I want to insert foo <b>bold</b> bar
input:
start
<h1 class="myclass">bar <i>italic</i></h1>
end
Desired output:
start
<h1 class="myclass">foo <b>bold</b> bar</h1>
end
How to solve this with Python?