From 4d32b3edf88ba3caa0218d6c8f3899b3b43f832e Mon Sep 17 00:00:00 2001 From: Alexander Shvetsov Date: Thu, 22 Oct 2009 04:13:00 +0200 Subject: [PATCH] Fix bug 265971 - \n in SUMMARY of VEVENT not interpreted. r=philipp --HG-- extra : rebase_source : 37101949ea955d677e76a1427a662ed5429468a0 --- calendar/base/content/calendar-task-tree.xml | 2 +- calendar/base/content/calendar-task-view.js | 2 +- calendar/base/content/calendar-unifinder.js | 2 +- calendar/base/content/calendar-view-core.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/calendar/base/content/calendar-task-tree.xml b/calendar/base/content/calendar-task-tree.xml index 6f383f572b..dc736e0bde 100644 --- a/calendar/base/content/calendar-task-tree.xml +++ b/calendar/base/content/calendar-task-tree.xml @@ -571,7 +571,7 @@ switch (aCol.element.getAttribute("itemproperty")) { case "title": // return title, or "Untitled" if empty/null - return task.title || calGetString("calendar", "eventUntitled"); + return task.title.replace(/\n/g, ' ') || calGetString("calendar", "eventUntitled"); case "entryDate": return this._formatDateTime(task.entryDate); case "dueDate": diff --git a/calendar/base/content/calendar-task-view.js b/calendar/base/content/calendar-task-view.js index 027c3a23d2..ea7b611d8e 100644 --- a/calendar/base/content/calendar-task-view.js +++ b/calendar/base/content/calendar-task-view.js @@ -61,7 +61,7 @@ var taskDetailsView = { if (displayElement("calendar-task-details-container", item != null) && displayElement("calendar-task-view-splitter", item != null)) { displayElement("calendar-task-details-title-row", true); - document.getElementById("calendar-task-details-title").value = item.title; + document.getElementById("calendar-task-details-title").value = item.title.replace(/\n/g, ' '); var organizer = item.organizer; if (displayElement("calendar-task-details-organizer-row", organizer != null)) { var name = organizer.commonName; diff --git a/calendar/base/content/calendar-unifinder.js b/calendar/base/content/calendar-unifinder.js index cd88a24011..e1325c159a 100644 --- a/calendar/base/content/calendar-unifinder.js +++ b/calendar/base/content/calendar-unifinder.js @@ -783,7 +783,7 @@ var unifinderTreeView = { switch (column.element.getAttribute("itemproperty")) { case "title": - return calendarEvent.title; + return calendarEvent.title.replace(/\n/g, ' '); case "startDate": return formatUnifinderEventDateTime(calendarEvent.startDate); diff --git a/calendar/base/content/calendar-view-core.xml b/calendar/base/content/calendar-view-core.xml index e1a80b5d84..f1446337e0 100644 --- a/calendar/base/content/calendar-view-core.xml +++ b/calendar/base/content/calendar-view-core.xml @@ -186,9 +186,9 @@ var item = this.mOccurrence; if (item.title && item.title != "") { - evl.value = item.title; + evl.value = item.title.replace(/\n/g, ' '); } else { - evl.value = calGetString("calendar", "eventUntitled") + evl.value = calGetString("calendar", "eventUntitled"); } ]]>