In my app, I'm using BeautifulSoup to process all the email templates before they are sent.
Some of them are complete HTML docs, but some of them are just plain texts (mostly used in tests).
As it's mentioned in the question title, I want to prevent BeautifulSoup from adding HTML tags around the plain text.
Here is the simplest example:
soup1 = BeautifulSoup("Hello World!")
html1 = str(soup1)
print(html1)
current output:
'<html><head></head><body>Hello World!</body></html>'
expected output:
'Hello World!'