浏览代码

fix encoding failures of parsed text_plain mail

FreddleSpl0it 2 年之前
父节点
当前提交
1e08b4ece6
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      data/web/inc/ajax/qitem_details.php

+ 1 - 0
data/web/inc/ajax/qitem_details.php

@@ -127,6 +127,7 @@ elseif (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
     $data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']);
     // Get text/plain content
     $data['text_plain'] = $mail_parser->getMessageBody('text');
+    if (!json_encode($data['text_plain'])) $data['text_plain'] = '';
     // Get html content and convert to text
     $data['text_html'] = $html2text->convert($mail_parser->getMessageBody('html'));
     if (empty($data['text_plain']) && empty($data['text_html'])) {