From 27806471142e74d667e5828dfdc1a0ec9d4f410c Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 30 Dec 2008 08:30:20 -0500
Subject: [PATCH] Use <pre> instead of <div class=pre>: Fix line-break issue when copy & paste in Firefox (#1485425)

---
 skins/default/mail.css      |    1 +
 program/steps/mail/func.inc |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index b3d7cfc..3fcdeb0 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -755,8 +755,8 @@
 
   // insert the links for urls and mailtos
   $body = preg_replace("/##string_replacement\{([0-9]+)\}##/e", "\$replace_strings[\\1]", join("\n", $a_lines));
-  
-  return "<div class=\"pre\">".$body."\n</div>";
+
+  return html::tag('pre', array(), $body);
 }
 
 /**
@@ -924,7 +924,7 @@
       }
     }
   else
-    $out .= html::div('message-part', html::div('pre', Q($MESSAGE->body)));
+    $out .= html::div('message-part', html::tag('pre', array(), Q($MESSAGE->body)));
 
 
   $ctype_primary = strtolower($MESSAGE->structure->ctype_primary);
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 18fcd12..9590ba9 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -820,6 +820,7 @@
   color: #0000CC;
 }
 
+div.message-part pre,
 div.message-part div.pre
 {
   margin: 0px;

--
Gitblit v1.9.1