From 521bea4bd8f2e462df3cf79fa5f2230a00e1115c Mon Sep 17 00:00:00 2001
From: prashant <prashant@jois.ca>
Date: Tue, 23 Jun 2015 18:09:14 -0400
Subject: [PATCH] Merge branch 'master' of https://github.com/roundcube/roundcubemail

---
 program/lib/Roundcube/rcube_html2text.php |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/program/lib/Roundcube/rcube_html2text.php b/program/lib/Roundcube/rcube_html2text.php
index 15dc2b5..a2f6288 100644
--- a/program/lib/Roundcube/rcube_html2text.php
+++ b/program/lib/Roundcube/rcube_html2text.php
@@ -216,7 +216,7 @@
      * @see $ent_search
      */
     protected $ent_replace = array(
-        ' ',                                    // Non-breaking space
+        "\xC2\xA0",                             // Non-breaking space
         '"',                                    // Double quotes
         "'",                                    // Single quotes
         '>',
@@ -509,7 +509,7 @@
      * @param string $link URL of the link
      * @param string $display Part of the text to associate number with
      */
-    protected function _build_link_list( $link, $display )
+    protected function _build_link_list($link, $display)
     {
         if (!$this->_do_links || empty($link)) {
             return $display;
@@ -520,6 +520,11 @@
             return $display;
         }
 
+        // skip links with href == content (#1490434)
+        if ($link === $display) {
+            return $display;
+        }
+
         if (preg_match('!^([a-z][a-z0-9.+-]+:)!i', $link)) {
             $url = $link;
         }

--
Gitblit v1.9.1