From 5e7aefd28a141396cb32bc57b2f9212724698b8a Mon Sep 17 00:00:00 2001 From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de> Date: Tue, 22 May 2018 12:53:27 +0200 Subject: [PATCH] Strip etherpad content before checking equality --- utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils.py b/utils.py index e60ddb9..5923bd2 100644 --- a/utils.py +++ b/utils.py @@ -151,9 +151,9 @@ def get_etherpad_text(pad): def set_etherpad_text(pad, text, only_if_default=True): if only_if_default: - current_text = get_etherpad_text(pad) - if (current_text != config.EMPTY_ETHERPAD - and len(current_text.strip()) > 0): + current_text = get_etherpad_text(pad).strip() + if (current_text != config.EMPTY_ETHERPAD.strip() + and len(current_text) > 0): return False file_like = BytesIO(text.encode("utf-8")) files = {"file": file_like} -- GitLab