mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
Merge branch 'master' of github.com:the-djmaze/snappymail
This commit is contained in:
commit
0bd5603dd0
2 changed files with 8 additions and 6 deletions
|
|
@ -289,6 +289,9 @@ export const
|
||||||
+ (0 < bqLevel ? ',' + (new Array(1 + bqLevel).fill('blockquote').join(' ')) : '')
|
+ (0 < bqLevel ? ',' + (new Array(1 + bqLevel).fill('blockquote').join(' ')) : '')
|
||||||
).forEach(oElement => oElement.remove());
|
).forEach(oElement => oElement.remove());
|
||||||
|
|
||||||
|
// https://github.com/the-djmaze/snappymail/issues/1125
|
||||||
|
tmpl.content.querySelectorAll('form,button').forEach(oElement => replaceWithChildren(oElement));
|
||||||
|
|
||||||
[...tmpl.content.querySelectorAll('*')].forEach(oElement => {
|
[...tmpl.content.querySelectorAll('*')].forEach(oElement => {
|
||||||
const name = oElement.tagName,
|
const name = oElement.tagName,
|
||||||
oStyle = oElement.style;
|
oStyle = oElement.style;
|
||||||
|
|
@ -394,7 +397,7 @@ export const
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (['CENTER','FORM'].includes(name)) {
|
// if (['CENTER','FORM'].includes(name)) {
|
||||||
if ('FORM' === name || 'O:P' === name || (nonEmptyTags.includes(name) && ('' == oElement.textContent.trim()))) {
|
if ('O:P' === name || (nonEmptyTags.includes(name) && ('' == oElement.textContent.trim()))) {
|
||||||
('A' !== name || !oElement.querySelector('IMG')) && replaceWithChildren(oElement);
|
('A' !== name || !oElement.querySelector('IMG')) && replaceWithChildren(oElement);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1356,7 +1356,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
async getMessageRequestParams(sSaveFolder, draft)
|
async getMessageRequestParams(sSaveFolder, draft)
|
||||||
{
|
{
|
||||||
let Text = this.oEditor.getData().trim(),
|
let Text = this.oEditor.getData().trim(),
|
||||||
l = Text.length,
|
l,
|
||||||
hasAttachments = 0;
|
hasAttachments = 0;
|
||||||
|
|
||||||
// Prepare ComposeAttachmentModel attachments
|
// Prepare ComposeAttachmentModel attachments
|
||||||
|
|
@ -1374,10 +1374,6 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!draft && !l && !hasAttachments) {
|
|
||||||
throw i18n('COMPOSE/ERROR_EMPTY_BODY');
|
|
||||||
}
|
|
||||||
|
|
||||||
const
|
const
|
||||||
identity = this.currentIdentity(),
|
identity = this.currentIdentity(),
|
||||||
params = {
|
params = {
|
||||||
|
|
@ -1426,6 +1422,9 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
? await this.mailvelope.createDraft()
|
? await this.mailvelope.createDraft()
|
||||||
: await this.mailvelope.encrypt(recipients);
|
: await this.mailvelope.encrypt(recipients);
|
||||||
} else if (sign || encrypt) {
|
} else if (sign || encrypt) {
|
||||||
|
if (!draft && !hasAttachments && !Text.length) {
|
||||||
|
throw i18n('COMPOSE/ERROR_EMPTY_BODY');
|
||||||
|
}
|
||||||
let data = new MimePart;
|
let data = new MimePart;
|
||||||
data.headers['Content-Type'] = 'text/'+(isHtml?'html':'plain')+'; charset="utf-8"';
|
data.headers['Content-Type'] = 'text/'+(isHtml?'html':'plain')+'; charset="utf-8"';
|
||||||
data.headers['Content-Transfer-Encoding'] = 'base64';
|
data.headers['Content-Transfer-Encoding'] = 'base64';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue