Fix bug in parsing vCard data using PHP 7.3 due to an invalid regexp (#6744)

Looks like \R is not allowed in character class, but \r\n is fine.
On PHP 7.3.5 it throws warnings and empty result from preg_replace(),
though I couldn't reproduce.
pull/6841/head
Aleksander Machniak 5 years ago
parent 9cb1912553
commit 8b706775f3

@ -3,6 +3,7 @@ CHANGELOG Roundcube Webmail
- Managesieve: Fix so "Create filter" option does not show up when Filters menu is disabled (#6723)
- Fix bug where bmp images couldn't be displayed on some systems (#6728)
- Fix bug in parsing vCard data using PHP 7.3 due to an invalid regexp (#6744)
RELEASE 1.3.9
-------------

@ -535,8 +535,8 @@ class rcube_vcard
'/item(\d+)\.(TEL|EMAIL|URL)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w() -]*)(?:>!\$_)?./si',
'/^item\d*\.X-AB.*$/mi', // remove cruft like item1.X-AB*
'/^item\d*\./mi', // remove item1.ADR instead of ADR
'/\n+/', // remove empty lines
'/^(N:[^;\R]*)$/m', // if N doesn't have any semicolons, add some
'/\n+/', // remove empty lines
'/^(N:[^;\r\n]*)$/m', // if N doesn't have any semicolons, add some
),
array(
'\2;type=\5\3:\4',

Loading…
Cancel
Save