From eda92ed4c0d2735144df8fa2136584de69634bdb Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 11 May 2014 11:03:45 +0200 Subject: Improved display of plain text messages and text to HTML conversion (#1488937) Now instead of
 we use 
styled with monospace font. We replace whitespace characters with non-breaking spaces where needed. I.e. plain text is always unwrappable, until it uses format=flowed, in such a case only flowed paragraphs are wrappable. Also conversion of text to HTML in compose editor was modified in the same way. --- program/steps/utils/text2html.inc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 program/steps/utils/text2html.inc (limited to 'program/steps/utils/text2html.inc') diff --git a/program/steps/utils/text2html.inc b/program/steps/utils/text2html.inc new file mode 100644 index 000000000..167243694 --- /dev/null +++ b/program/steps/utils/text2html.inc @@ -0,0 +1,28 @@ + | + +-----------------------------------------------------------------------+ +*/ + +$text = stream_get_contents(fopen('php://input', 'r')); + +$converter = new rcube_text2html($text, false, array('wrap' => true)); + +header('Content-Type: text/html; charset=' . RCUBE_CHARSET); +print $converter->get_html(); +exit; -- cgit v1.2.3