diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-06 12:36:45 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-06 12:38:28 +0000 |
commit | f08fd055ce127140554d3a50f4feffdf0c803154 (patch) | |
tree | 23a762126d2693907da519f49ff63d2b0f144be6 /src/libmime/message.c | |
parent | 4240400bc04d6c06ce5e1cebdbd77441ff2fb35f (diff) | |
download | rspamd-f08fd055ce127140554d3a50f4feffdf0c803154.tar.gz rspamd-f08fd055ce127140554d3a50f4feffdf0c803154.zip |
[Feature] Enchance text_part:get_content method
This method now supports otional `type` attribute which could be
following:
- `content` (default): utf8 content with HTML tags stripped and newlines preserved
- `content_oneline`: utf8 content with HTML tags and newlines stripped
- `raw`: raw content, not mime decoded nor utf8 converted
- `raw_parsed`: raw content, mime decoded, not utf8 converted
- `raw_utf`: raw content, mime decoded, utf8 converted (but with HTML tags and newlines)
Diffstat (limited to 'src/libmime/message.c')
-rw-r--r-- | src/libmime/message.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c index a4f3be5ca..40769037b 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -497,6 +497,7 @@ rspamd_message_process_text_part (struct rspamd_task *task, &text_part->exceptions, task->urls, task->emails); + text_part->utf_raw_content = part_content; if (text_part->content->len == 0) { text_part->flags |= RSPAMD_MIME_TEXT_PART_FLAG_EMPTY; @@ -526,6 +527,7 @@ rspamd_message_process_text_part (struct rspamd_task *task, text_part->content = rspamd_mime_text_part_maybe_convert (task, text_part); + text_part->utf_raw_content = text_part->content; if (text_part->content != NULL) { /* |