mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 17:18:50 -05:00
bfb0316583
The problem:
Configure the account (just an example -- problems can occur in other
configurations as well):
Message Format: HTML
Reply quoting style: Prefix
Quote message when replying: yes
Reply after quoted text: yes
Reply to a message that has a large quantity (20+) of \r\n scattered in
the body of its HTML version (not an unusual scenario).
Add a reply. Save the message as a draft. Go back & open the draft
again. A fatal IndexOutOfBoundsException occurs.
The cause:
When the draft was saved, the X-K9mail-Identity header was computed and
added to the message, then the text of the message was processed with
MimeUtility.fixDraftTextBody, replacing all occurrences of \r\n with \n in
the quoted message before being saved in LocalStore, thus invalidating the
X-K9mail-Identity header.
The fix:
Remove MimeUtility.fixDraftTextBody and implement
MessageCompose$EolConvertingEditText instead. Any message text placed in
an EolConvertingEditText widget is assured to have \n line endings. Any
message text extracted from an EolConvertingEditText widget is assured to
have \r\n line endings. The X-K9mail-Identity header will always be
computed correctly.
Issues thought to be related: 4782, 5010, 5634, 5725
As noted in some of the referenced issues, errors didn't always result in
a fatal exception, but instead with mixed up text.
Ref: commit
|
||
---|---|---|
.. | ||
accessible_email_content.xml | ||
account_list.xml | ||
account_setup_account_type.xml | ||
account_setup_basics.xml | ||
account_setup_check_settings.xml | ||
account_setup_composition.xml | ||
account_setup_incoming.xml | ||
account_setup_names.xml | ||
account_setup_options.xml | ||
account_setup_outgoing.xml | ||
accounts_folders_icons.xml | ||
accounts_item.xml | ||
accounts_password_prompt.xml | ||
accounts.xml | ||
actionbar_custom.xml | ||
actionbar_indeterminate_progress_actionview.xml | ||
actionbar_indeterminate_progress.xml | ||
choose_account_item.xml | ||
choose_identity_item.xml | ||
color_picker_dialog.xml | ||
edit_identity.xml | ||
email_address_list_item.xml | ||
email_address_list.xml | ||
empty_message_view.xml | ||
folder_list_item.xml | ||
folder_list.xml | ||
list_content_simple.xml | ||
message_compose_attachment.xml | ||
message_compose.xml | ||
message_list_fragment.xml | ||
message_list_item_footer.xml | ||
message_list_item.xml | ||
message_list_loading.xml | ||
message_list.xml | ||
message_view_attachment.xml | ||
message_view_crypto_layout.xml | ||
message_view_header.xml | ||
message.xml | ||
recipient_dropdown_item.xml | ||
split_message_list.xml | ||
unread_widget_layout.xml | ||
upgrade_databases.xml | ||
welcome_message.xml | ||
wizard_cancel.xml | ||
wizard_done.xml | ||
wizard_next.xml | ||
wizard_setup.xml | ||
wizard_welcome.xml |