It is required in the finished lines to replace the characters with the corresponding html-code.
for example:
rules = {
'<':'<',
'>':'>'
}
It is required in the finished lines to replace the characters with the corresponding html-code.
for example:
rules = {
'<':'<',
'>':'>'
}
Since python 3.2 there is the html module with is escape function.
For example
>>> import html
>>> html.escape("5 > 3")
'5 > 3'