From 8a2181a9b5aaf90b2a7656d42172f4fd0d5dbdca Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 21 Mar 2011 20:09:56 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 9b1266835546cad935416117e959f5990a2363db Monotone-Revision: f46a82535044ebae377ca25229db810ded914ae0 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-03-21T20:09:56 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/WebServerResources/UIxPreferences.js | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 431ad4574..74a36771a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ * SoObjects/SOGo/LDAPSource.m (:_qualifierForFilter): avoid duplicated filters on the CN attribute. + * UI/WebServerResources/UIxPreferences.js + (displayAccountSignature): strips the tags and unescape the HTML + to improve readability. + 2011-03-20 Wolfgang Sourdeau * OpenChange/MAPIStoreCalendarMessage.m diff --git a/UI/WebServerResources/UIxPreferences.js b/UI/WebServerResources/UIxPreferences.js index e929f799e..eb247bfc1 100644 --- a/UI/WebServerResources/UIxPreferences.js +++ b/UI/WebServerResources/UIxPreferences.js @@ -670,7 +670,9 @@ function displayAccountSignature(mailAccount) { var identity = (mailAccount["identities"] ? mailAccount["identities"][0] : {} ); - var value = identity["signature"]; + var value = identity["signature"].replace(/^[ \n\r]*$/, ""); + if (CKEDITOR.instances["signature"]) + value = value.stripTags().unescapeHTML(); if (value && value.length > 0) { if (value.length < 30) { actSignatureValue = value; @@ -685,7 +687,7 @@ function displayAccountSignature(mailAccount) { while (actSignature.firstChild) { actSignature.removeChild(actSignature.firstChild); } - actSignature.appendChild(document.createTextNode(actSignatureValue)); + actSignature.update(actSignatureValue); } function createMailAccount() {