Fix specifying the charset when exporting as HTML
ClosedPublic

Authored by wbauer on Aug 8 2017, 4:40 PM.

Details

Summary

The QString::replace() had no effect because the stream actually contains <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">, not just <!DOCTYPE html>.

Also, the <meta> tag should be inside the <head> section.

BUG: 374260

Test Plan

Select a mail with german umlauts or other special characters, and choose "Print Preview".
The characters are displayed correctly now in the Webbrowser.

The temporary file contains now:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta charset="UTF-8"><title></title><style>...

Diff Detail

Repository
R94 PIM: Message Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wbauer created this revision.Aug 8 2017, 4:40 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptAug 8 2017, 4:40 PM
wbauer retitled this revision from Fix specifying the charset when exporting as HMTL to Fix specifying the charset when exporting as HTML.Aug 8 2017, 7:51 PM
wbauer edited the summary of this revision. (Show Details)
wbauer edited the test plan for this revision. (Show Details)
mlaurent accepted this revision.Aug 9 2017, 4:51 AM

Ok thanks.
Could you commit it in 17.08 and after using git merge please ?
thanks

This revision is now accepted and ready to land.Aug 9 2017, 4:51 AM
This revision was automatically updated to reflect the committed changes.