[Notification] Replace all newlines in body with spaces

Accidentally we only replaced the first newline of the body text with
spaces - replace all occurrences instead.

https://bugzilla.gnome.org/show_bug.cgi?id=610549
This commit is contained in:
Florian Müllner 2010-02-20 22:08:54 +01:00
parent 79fe60e6fb
commit ec725cc6d4

View File

@ -116,7 +116,7 @@ Notification.prototype = {
y_fill: false });
this._titleLabel = new St.Label();
title = title ? _cleanMarkup(title.replace('\n', ' ')) : '';
title = title ? _cleanMarkup(title.replace(/\n/g, ' ')) : '';
this._titleLabel.clutter_text.set_markup('<b>' + title + '</b>');
this._bannerBox.add_actor(this._titleLabel);
@ -126,7 +126,7 @@ Notification.prototype = {
this._bannerBodyText = null;
this._bannerLabel = new St.Label();
banner = banner ? _cleanMarkup(banner.replace('\n', ' ')) : '';
banner = banner ? _cleanMarkup(banner.replace(/\n/g, ' ')) : '';
this._bannerLabel.clutter_text.set_markup(banner);
this._bannerBox.add_actor(this._bannerLabel);
},