diff options
Diffstat (limited to 'cgi/formatting.py')
-rw-r--r-- | cgi/formatting.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cgi/formatting.py b/cgi/formatting.py index 47922c9..ead1d0f 100644 --- a/cgi/formatting.py +++ b/cgi/formatting.py @@ -47,9 +47,10 @@ def format_post(message, ip, parentid, parent_timestamp=0): # If not using markdown quotes must be created and \n changed for HTML line breaks if not using_markdown: - message = re.compile(r"^(\n)+").sub('', message) - message = checkQuotes(message) + message = re.compile(r"^[\s\t]*(\n)+").sub("", message) + message = re.compile(r"\n(\n)+").sub("<br /><br />", message) message = message.replace("\n", "<br />") + message = checkQuotes(message) return message |