From e48f8945b32ab5b67f1cdeb53a37d3d196e31e4d Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 20 May 2016 05:19:01 -0400
Subject: [PATCH] Fix bug where message list columns could be in wrong order after column drag-n-drop and list sorting
---
program/include/rcmail_string_replacer.php | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/program/include/rcmail_string_replacer.php b/program/include/rcmail_string_replacer.php
index d3fdc3e..abd5ff8 100644
--- a/program/include/rcmail_string_replacer.php
+++ b/program/include/rcmail_string_replacer.php
@@ -41,6 +41,16 @@
{
$href = $matches[1];
$suffix = $this->parse_url_brackets($href);
+ $email = $href;
+
+ if (strpos($email, '?')) {
+ list($email,) = explode('?', $email);
+ }
+
+ // skip invalid emails
+ if (!rcube_utils::check_email($email, false)) {
+ return $matches[1];
+ }
$i = $this->add(html::a(array(
'href' => 'mailto:' . $href,
--
Gitblit v1.9.1