Aleksander Machniak
2013-04-22 a2446d929654a4d1be113d6cab6b7fff4ae4e382
Fix another text wrapping issue
2 files modified
8 ■■■■ changed files
program/lib/Roundcube/rcube_mime.php 4 ●●●● patch | view | raw | blame | history
tests/Framework/Mime.php 4 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_mime.php
@@ -622,7 +622,7 @@
                $subString = $substr_func($string, 0, $width, $charset);
                // last line
                if ($subString === $string) {
                if ($breakPos === false && $subString === $string) {
                    $cutLength = null;
                }
                else {
@@ -652,7 +652,7 @@
                        else if ($cut === false) {
                            $spacePos = $strpos_func($string, ' ', 0, $charset);
                            if ($spacePos !== false) {
                            if ($spacePos !== false && $spacePos < $breakPos) {
                                $subString = $substr_func($string, 0, $spacePos, $charset);
                                $cutLength = $spacePos + 1;
                            }
tests/Framework/Mime.php
@@ -181,6 +181,10 @@
                array("abc def", 3, "-"),
                "abc-def",
            ),
            array(
                array("----------------------------------------------------------------------------------------\nabc                        def123456789012345", 76),
                "----------------------------------------------------------------------------------------\nabc                        def123456789012345",
            ),
        );
        foreach ($samples as $sample) {