File size: 170 Bytes
39fbaa4
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import html


def plaintext_to_html(text):
    text = (
            "<p>" + "<br>\n".join([f"{html.escape(x)}" for x in text.split("\n")]) + "</p>"
    )
    return text