Aleksander Machniak
2015-04-09 22c0b291f6bd90915e4ea48c831d268b37fa5db5
program/lib/Roundcube/rcube_text2html.php
@@ -46,6 +46,10 @@
    protected $config = array(
        // non-breaking space
        'space'  => "\xC2\xA0",
        // word-joiner (zero-width no-break space)
        // 'wordjoiner' => "\xEF\xBB\xBF", // U+2060
        // use deprecated U+FEFF character because of webkit issue with displaying U+2060 (#1490353)
        'wordjoiner' => "\xEF\xBB\xBF", // U+FEFF
        // enables format=flowed parser
        'flowed' => false,
        // enables wrapping for non-flowed text
@@ -278,6 +282,7 @@
        $text = strtr($text, $table);
        $nbsp = $this->config['space'];
        $nobr = $this->config['wordjoiner'];
        // replace some whitespace characters
        $text = str_replace(array("\r", "\t"), array('', '    '), $text);
@@ -299,9 +304,15 @@
            $text = $copy;
        }
        else {
            // make the whole line non-breakable
            $text = str_replace(array(' ', '-', '/'), array($nbsp, '-⁠', '/⁠'), $text);
        else {
            $repl = array(
                ' ' => $nbsp,
                '-' => $nobr . '-' . $nobr,
                '/' => $nobr . '/',
            );
            $text = str_replace(array_keys($repl), array_values($repl), $text);
        }
        return $text;