mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/13433] Fix parsing of email addresses
Currently email addresses are parsed incorrectly due to the regex structure. Namely, if localpart consists of several dot separated parts, only the last part with the trailing dot will be captured. The patch change this behavior to capture the whole localpart. PHPBB3-13433
This commit is contained in:
parent
088907fe8e
commit
fa1c61f608
1 changed files with 1 additions and 1 deletions
|
@ -3347,7 +3347,7 @@ function get_preg_expression($mode)
|
||||||
case 'email':
|
case 'email':
|
||||||
// Regex written by James Watts and Francisco Jose Martin Moreno
|
// Regex written by James Watts and Francisco Jose Martin Moreno
|
||||||
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
|
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
|
||||||
return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
return '((?:[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+)@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bbcode_htm':
|
case 'bbcode_htm':
|
||||||
|
|
Loading…
Add table
Reference in a new issue