From b18240370d3ed7159e217197f01b0e06b8030946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 10 Mar 2015 23:36:09 +0100 Subject: [PATCH] calendar: Filter out newlines when unexpanded Enabling line-wrapping of the unexpanded body is not enough to enforce a single line when the text has embedded newlines, so replace these with spaces (this is similar to setting ClutterText:single-line-mode, however that would use a paragraph separator glyph instead). --- js/ui/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 22c0c2c13..19d154ad2 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -1044,7 +1044,7 @@ const Message = new Lang.Class({ setBody: function(text) { this._bodyText = text; - this.bodyLabel.setMarkup(text, this._useBodyMarkup); + this.bodyLabel.setMarkup(text.replace(/\n/g, ' '), this._useBodyMarkup); }, setUseBodyMarkup: function(enable) {