From 328876db5c760dc1c2bda1fed1e6daab285a8e2f Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 09 Aug 2013 04:15:51 -0400
Subject: [PATCH] Fix image scaling issues when image has only one dimension smaller than the limit (#1489274) Other small code improvements.
---
program/lib/Roundcube/rcube_html2text.php | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/program/lib/Roundcube/rcube_html2text.php b/program/lib/Roundcube/rcube_html2text.php
index 3d32fe7..9b248a3 100644
--- a/program/lib/Roundcube/rcube_html2text.php
+++ b/program/lib/Roundcube/rcube_html2text.php
@@ -597,9 +597,16 @@
// get blockquote content
$body = trim(substr($text, $startpos, $end - $startpos));
+ // adjust text wrapping width
+ $p_width = $this->width;
+ if ($this->width > 0) $this->width -= 2;
+
// replace content with inner blockquotes
$this->_converter($body);
+ // resore text width
+ $this->width = $p_width;
+
// Add citation markers and create <pre> block
$body = preg_replace_callback('/((?:^|\n)>*)([^\n]*)/', array($this, 'blockquote_citation_ballback'), trim($body));
$body = '<pre>' . htmlspecialchars($body) . '</pre>';
--
Gitblit v1.9.1