Skip to content

Commit

Permalink
Fix wrapping when converting HTML to plain text.
Browse files Browse the repository at this point in the history
There is no 'wrap' parameter in the Html2text Filter, we have to set the width
to 0 instead. This broke flowed text wrapping of text/plain alternative parts
in any HTML messages sent by IMP.
  • Loading branch information
yunosh committed Nov 12, 2015
1 parent 53e98f4 commit 3d6c17c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion imp/lib/Compose.php
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ protected function _createMimeMessage(
$body_html->returnHtml(),
'Html2text',
array(
'wrap' => false
'width' => 0
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion imp/lib/Compose/Ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function convertComposeText($data, $to)

case 'text':
return $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($data, 'Html2text', array(
'wrap' => false
'width' => 0
));
}
}
Expand Down
2 changes: 1 addition & 1 deletion imp/lib/Mime/Viewer/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected function _IMPrender($inline)
* text. */
if ($convert_text) {
$data = $this->_textFilter($data, 'Html2text', array(
'wrap' => false
'width' => 0
));

// Filter bad language.
Expand Down

0 comments on commit 3d6c17c

Please sign in to comment.