diff --git a/ietf/idrfc/testsREDESIGN.py b/ietf/idrfc/testsREDESIGN.py index f5fb7ef7f..35ba65532 100644 --- a/ietf/idrfc/testsREDESIGN.py +++ b/ietf/idrfc/testsREDESIGN.py @@ -434,15 +434,15 @@ class EditPositionTestCase(django.test.TestCase): events_before = draft.docevent_set.count() r = self.client.post(url, dict(position="discuss", - discuss="This is a discussion test.", - comment="This is a test.")) + discuss=" This is a discussion test. \n ", + comment=" This is a test. \n ")) self.assertEquals(r.status_code, 302) pos = draft.latest_event(BallotPositionDocEvent, ad=ad) self.assertEquals(pos.pos.slug, "discuss") - self.assertTrue("This is a discussion test." in pos.discuss) + self.assertTrue(" This is a discussion test." in pos.discuss) self.assertTrue(pos.discuss_time != None) - self.assertTrue("This is a test." in pos.comment) + self.assertTrue(" This is a test." in pos.comment) self.assertTrue(pos.comment_time != None) self.assertTrue("New position" in pos.desc) self.assertEquals(draft.docevent_set.count(), events_before + 3) diff --git a/ietf/idrfc/views_ballot.py b/ietf/idrfc/views_ballot.py index 6169bba2e..00b9446b1 100644 --- a/ietf/idrfc/views_ballot.py +++ b/ietf/idrfc/views_ballot.py @@ -266,9 +266,9 @@ def edit_positionREDESIGN(request, name): pos.type = "changed_ballot_position" pos.ad = ad pos.pos = clean["position"] - pos.comment = clean["comment"].strip() + pos.comment = clean["comment"].rstrip() pos.comment_time = old_pos.comment_time if old_pos else None - pos.discuss = clean["discuss"].strip() + pos.discuss = clean["discuss"].rstrip() pos.discuss_time = old_pos.discuss_time if old_pos else None changes = []