Skip to content

Commit

Permalink
Bug: 14045 Consistently convert html2text for ActiveSync notes.
Browse files Browse the repository at this point in the history
...at least until Mnemo gets HTML support in the next major version.
  • Loading branch information
mrubinsk committed Jul 14, 2015
1 parent 2bb252b commit 436828a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mnemo/lib/Api.php
Expand Up @@ -791,7 +791,13 @@ public function replace($uid, $content, $contentType)
break;

case 'activesync':
$storage->modify($memo['memo_id'], Horde_String::substr($content->subject, 0, 255), $content->body->data, $content->categories);
// We only support plaintext
if ($content->body->type == Horde_ActiveSync::BODYPREF_TYPE_HTML) {
$body = Horde_Text_Filter::filter($content->body->data, 'Html2text');
} else {
$body = $content->body->data;
}
$storage->modify($memo['memo_id'], Horde_String::substr($content->subject, 0, 255), $body, $content->categories);
break;

default:
Expand Down

0 comments on commit 436828a

Please sign in to comment.