You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_log_module&&!has_rfc_822_message&&console.log(`\ngetHtmlAndTextBody(), html result came from '${html_info.source}' and has a length of '${html_info.result.length}'`);
_log_module&&!has_rfc_822_message&&console.log(`\ngetHtmlAndTextBody(), html result came from '${html_info.source}' and has a length of '${html_info.result.length}'`);
_log_module&&!has_rfc_822_message&&console.log(`\ngetHtmlAndTextBody(), text result came from '${text_info.source}' and has a length of '${text_info.result.length}'`);
77
+
_log_module&&!has_rfc_822_message&&console.log(`\ngetHtmlAndTextBody(), text result came from '${text_info.source}' and has a length of '${text_info.result.length}'`);
/* analyse results and overwrite html if text is better parsed */
100
+
/* analyze results and overwrite html if text is better parsed */
102
101
function(html_info,text_info,waterfall_callback){
103
102
104
-
varuse_text_for_html=!html_info.result// if we have no html result
103
+
varuse_text_for_html=!html_info.result// if we have no html result
105
104
||
106
-
(text_info.result&&html_info.source.includes('mailparser')&&!text_info.source.includes('mailparser'))// if we have a text result, and the html result was from mailparser
105
+
(text_info.result&&html_info.source.includes('mailparser')&&!text_info.source.includes('mailparser')// if we have a text result, and the html result was from mailparser
107
106
||
108
-
(!html_info.has_valid_encoding&&text_info.has_valid_encoding);// or we could not properly decode the content for the html but we could for the text
107
+
(!html_info.has_valid_encoding&&text_info.has_valid_encoding)// or we could not properly decode the content for the html but we could for the text
108
+
);
109
+
110
+
varuse_text_for_html=!html_info.result;
109
111
110
112
// override any html mailparser result we have if there's a valid text result
_log_module&&!is_matching_node&&console.log(`${'\t'.repeat(depth)} [${index}] not a matching node for type '${type}'`);
345
351
352
+
346
353
if(is_matching_node){
347
354
_log_module&&console.log(`${'\t'.repeat(depth)} [${index}] found a matching bodytype of length '${haraka_obj.bodytext.length||haraka_obj.body_text_encoded.length}' for type '${type}'`);
0 commit comments