From a9170f652c6570132a0a01b82f78d9cdcac484bc Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 2 Nov 2017 18:17:23 +0100 Subject: [PATCH] Fix decoding of mailto: links with + character in HTML messages (#6020) --- CHANGELOG | 2 ++ program/steps/mail/func.inc | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 583d87d71..bf4714702 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ CHANGELOG Roundcube Webmail =========================== +- Fix decoding of mailto: links with + character in HTML messages (#6020) + RELEASE 1.3.2 ------------- - Improve detection for Egde browser and add pointer event support (#5922) diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 4513ea447..aab206e95 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1586,8 +1586,9 @@ function rcmail_washtml_link_callback($tag, $attribs, $content, $washtml) else if (preg_match('/^mailto:(.+)/i', $attrib['href'], $mailto)) { list($mailto, $url) = explode('?', html_entity_decode($mailto[1], ENT_QUOTES, 'UTF-8'), 2); - $url = urldecode($url); - $mailto = urldecode($mailto); + // #6020: use raw encoding for correct "+" character handling as specified in RFC6068 + $url = rawurldecode($url); + $mailto = rawurldecode($mailto); $addresses = rcube_mime::decode_address_list($mailto, null, true); $mailto = array();