Say I have the following string:
"I am the most foo h4ck3r ever!!"
I'm trying to write a makeSpecial(foo) function where the foo substring would be wrapped in a new span element, resulting in:
"I am the most <span class="special">foo></span> h4ck3r ever!!"
BeautifulSoup seemed like the way to go, but I haven't been able to make it work.
I could also pass this to the browser and do it with javascript, but that doesn't seem like a great idea.
Some advice for this would be really useful, especially in python.