From 419de8d1340ed501cbd121359280fdab6ec6618c Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 14 Apr 2011 21:26:35 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: be2628456056b13146b29cb36efc2deaf49d537f Monotone-Revision: e58e01ba23d307338c0721fcb30c8c45fb1a15f4 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-04-14T21:26:35 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ UI/WebServerResources/UIxContactEditor.js | 11 +++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26ba62df4..5196dd629 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-04-14 Francis Lachapelle + * UI/WebServerResources/UIxContactEditor.js + (validateContactEditor): now uses the regexp defined in generic.js + (emailRE) to validate the email addresses. This fixes an issue + with valid addresses starting with an underscore (bug #1246). + * UI/MailerUI/UIxMailAccountActions.m (-composeAction): properly decode submitted recipients and subjects (URL-encoded). diff --git a/UI/WebServerResources/UIxContactEditor.js b/UI/WebServerResources/UIxContactEditor.js index 1d0755d65..4b0d49a11 100644 --- a/UI/WebServerResources/UIxContactEditor.js +++ b/UI/WebServerResources/UIxContactEditor.js @@ -2,7 +2,7 @@ /* Copyright (C) 2005 SKYRIX Software AG - Copyright (C) 2006-2010 Inverse + Copyright (C) 2006-2011 Inverse This file is part of OpenGroupware.org. @@ -22,11 +22,6 @@ 02111-1307, USA. */ -var uixEmailUsr = - "([a-zA-Z0-9][a-zA-Z0-9_.-]*|\"([^\\\\\x80-\xff\015\012\"]|\\\\[^\x80-\xff])+\")"; -var uixEmailDomain = - "([a-zA-Z0-9][a-zA-Z0-9._-]*\\.)*[a-zA-Z0-9][a-zA-Z0-9._-]*\\.[a-zA-Z]{2,6}"; -var uixEmailRegex = new RegExp("^"+uixEmailUsr+"\@"+uixEmailDomain+"$"); var dateRegex = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/; var displayNameChanged = false; @@ -88,14 +83,14 @@ function validateContactEditor() { var e = $('workMail'); if (e.value.length > 0 - && !uixEmailRegex.test(e.value)) { + && !emailRE.test(e.value)) { alert(_("invalidemailwarn")); rc = false; } e = $('homeMail'); if (e.value.length > 0 - && !uixEmailRegex.test(e.value)) { + && !emailRE.test(e.value)) { alert(_("invalidemailwarn")); rc = false; }