mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 02:41:02 +01:00
* Mail: show validation error if local part (before @) of email-address contains non-ascii chars
This commit is contained in:
parent
3372e1b1c2
commit
ab79e193ec
@ -41,12 +41,14 @@ var et2_url = (function(){ "use strict"; return et2_textbox.extend(
|
|||||||
* - "Becker < Ralf <rb@stylite.de>" (contains < ----------- " ---------------)
|
* - "Becker < Ralf <rb@stylite.de>" (contains < ----------- " ---------------)
|
||||||
*
|
*
|
||||||
* About umlaut or IDN domains: we currently only allow German umlauts in domain part!
|
* About umlaut or IDN domains: we currently only allow German umlauts in domain part!
|
||||||
|
* We forbid all non-ascii chars in local part, as Horde does not yet support SMTPUTF8 extension (rfc6531)
|
||||||
|
* and we get a "SMTP server does not support internationalized header data" error otherwise.
|
||||||
*
|
*
|
||||||
* Using \042 instead of " to NOT stall minifyer!
|
* Using \042 instead of " to NOT stall minifyer!
|
||||||
*
|
*
|
||||||
* Same preg is in Etemplate\Widget\Url PHP class!
|
* Same preg is in Etemplate\Widget\Url PHP class!
|
||||||
*/
|
*/
|
||||||
EMAIL_PREG: new RegExp(/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|)\s?<)?[^\x00-\x20()<>@,;:\042\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,}>?$/i),
|
EMAIL_PREG: new RegExp(/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|)\s?<)?[^\x00-\x20()<>@,;:\042\[\]\x80-\xff]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,}>?$/i),
|
||||||
/**
|
/**
|
||||||
* @memberOf et2_url
|
* @memberOf et2_url
|
||||||
*/
|
*/
|
||||||
|
@ -35,10 +35,12 @@ class Url extends Etemplate\Widget
|
|||||||
* - ToDo: "\u200Bfrancesca.klein@ikem.de" (starts with a "zero width space")
|
* - ToDo: "\u200Bfrancesca.klein@ikem.de" (starts with a "zero width space")
|
||||||
*
|
*
|
||||||
* About umlaut or IDN domains: we currently only allow German umlauts in domain part!
|
* About umlaut or IDN domains: we currently only allow German umlauts in domain part!
|
||||||
|
* We forbid all non-ascii chars in local part, as Horde does not yet support SMTPUTF8 extension (rfc6531)
|
||||||
|
* and we get a "SMTP server does not support internationalized header data" error otherwise.
|
||||||
*
|
*
|
||||||
* Same preg is in et2_widget_url Javascript class, but no \x00 allowed and /u modifier for utf8!
|
* Same preg is in et2_widget_url Javascript class, but no \x00 allowed and /u modifier for utf8!
|
||||||
*/
|
*/
|
||||||
const EMAIL_PREG = "/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|)\s?<)?[^\x01-\x20()<>@,;:\042\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,}>?$/iu";
|
const EMAIL_PREG = "/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|)\s?<)?[^\x01-\x20()<>@,;:\042\[\]\x80-\xff]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,}>?$/iu";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate input
|
* Validate input
|
||||||
|
Loading…
Reference in New Issue
Block a user