html library
import html
text = '<b id="test">\'Hi\'</b>'
escaped = html.escape(text)
print(escaped)
text = html.unescape(escaped)
print(text)
import html
text = '<b id="test">\'Hi\'</b>'
escaped = html.escape(text)
print(escaped)
text = html.unescape(escaped)
print(text)
Leave a Comment
Cancel reply