From d3ea7b510ee2460ef9c244d8d634a03dace5ecfd Mon Sep 17 00:00:00 2001 From: rudyon Date: Thu, 13 Jul 2023 20:16:40 +0300 Subject: [PATCH] removes a line that broke hard line brakes intentionally to fix Markdown implementation fails to produce hard line breaks properly #440 (#591) --- files/helpers/sanitize.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 021cb895b..110f7a8e7 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -184,9 +184,6 @@ def sanitize_raw(sanitized:Optional[str], allow_newlines:bool, length_limit:Opti @with_gevent_timeout(2) def sanitize(sanitized, alert=False, comment=False, edit=False): - # double newlines, eg. hello\nworld becomes hello\n\nworld, which later becomes

hello

world

- sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized) - if MULTIMEDIA_EMBEDDING_ENABLED: # turn eg. https://wikipedia.org/someimage.jpg into ![](https://wikipedia.org/someimage.jpg) sanitized = image_regex.sub(r'\1![](\2)\4', sanitized)