diff options
Diffstat (limited to 'src/htmlTextPart.cpp')
-rw-r--r-- | src/htmlTextPart.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/htmlTextPart.cpp b/src/htmlTextPart.cpp index e97161cb..680d3955 100644 --- a/src/htmlTextPart.cpp +++ b/src/htmlTextPart.cpp @@ -198,21 +198,10 @@ void htmlTextPart::parse(shared_ptr <const bodyPart> message, shared_ptr <const shared_ptr <const contentTypeField> ctf = textPart->getHeader()->findField <contentTypeField>(fields::CONTENT_TYPE); - if (ctf) - { - try - { - m_charset = ctf->getCharset(); - } - catch (exceptions::no_such_parameter) - { - // No "charset" parameter. - } - } + if (ctf && ctf->hasCharset()) + m_charset = ctf->getCharset(); else - { - // No "Content-type" field. - } + m_charset = charset(); // Extract embedded objects. The algorithm is quite simple: for each previously // found inline part, we check if its CID/Location is contained in the HTML text. |