diff --git a/etemplate/inc/class.etemplate_widget_url.inc.php b/etemplate/inc/class.etemplate_widget_url.inc.php index 639d4ead8f..1078e31e9e 100644 --- a/etemplate/inc/class.etemplate_widget_url.inc.php +++ b/etemplate/inc/class.etemplate_widget_url.inc.php @@ -25,6 +25,7 @@ class etemplate_widget_url extends etemplate_widget * + "" or "rb@stylite.de" * + '"Becker, Ralf" ' * + "'Becker, Ralf' " + * + "Ralf Becker " (contains comma outside " or ' enclosed block) * - "Becker < Ralf " (contains < ----------- " ---------------) @@ -33,7 +34,7 @@ class etemplate_widget_url extends etemplate_widget * * 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,6}>?$/iu"; + const EMAIL_PREG = "/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|\042[^\042]+)\s?<)?[^\x00-\x20()<>@,;:\042\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,6}>?\042?$/iu"; /** * Validate input diff --git a/etemplate/js/et2_widget_url.js b/etemplate/js/et2_widget_url.js index 23915b99e2..e0a6f2a1ca 100644 --- a/etemplate/js/et2_widget_url.js +++ b/etemplate/js/et2_widget_url.js @@ -38,6 +38,7 @@ var et2_url = et2_textbox.extend( * + "" or "rb@stylite.de" * + '"Becker, Ralf" ' * + "'Becker, Ralf' " + * + "Ralf Becker " (contains comma outside " or ' enclosed block) * - "Becker < Ralf " (contains < ----------- " ---------------) @@ -48,7 +49,7 @@ var et2_url = et2_textbox.extend( * * 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,6}>?$/i), + EMAIL_PREG: new RegExp(/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|\042[^\042]+)\s?<)?[^\x00-\x20()<>@,;:\042\[\]]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,6}>?\042?$/i), /** * @memberOf et2_url */