fixed mail_ quoted_text placeholder also for forwarded messages
This commit is contained in:
parent
91f010284f
commit
e7c1d0d701
2 changed files with 10 additions and 4 deletions
|
|
@ -79,7 +79,10 @@ switch (message.command) {
|
||||||
|
|
||||||
for (const node of children) {
|
for (const node of children) {
|
||||||
if (node instanceof Element) {
|
if (node instanceof Element) {
|
||||||
if (node.classList.contains('moz-cite-prefix')) {
|
if (node.classList.contains('moz-cite-prefix')) { // quoted text in a reply
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (node.classList.contains('moz-forward-container')) { // quoted text in a forward
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -121,7 +124,7 @@ switch (message.command) {
|
||||||
|
|
||||||
for (const node of children) {
|
for (const node of children) {
|
||||||
if (!foundCitePrefix) {
|
if (!foundCitePrefix) {
|
||||||
if (node instanceof Element && node.classList.contains('moz-cite-prefix')) {
|
if (node instanceof Element && (node.classList.contains('moz-cite-prefix') || node.classList.contains('moz-forward-container'))) {
|
||||||
foundCitePrefix = true;
|
foundCitePrefix = true;
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -485,8 +485,11 @@ const insertHtml = function (replyHtml, fullBody_string) {
|
||||||
let fullBody = parser.parseFromString(fullBody_string, "text/html");
|
let fullBody = parser.parseFromString(fullBody_string, "text/html");
|
||||||
let reply = parser.parseFromString(replyHtml, "text/html");
|
let reply = parser.parseFromString(replyHtml, "text/html");
|
||||||
|
|
||||||
// looking for the first quoted mail or the signature, which come first in case of "signature above the quote".
|
// looking for the first quoted mail (reply or forward) or the signature, which come first in case of "signature above the quote".
|
||||||
const prefix_quote = fullBody.getElementsByClassName("moz-cite-prefix");
|
let prefix_quote = fullBody.getElementsByClassName("moz-cite-prefix");
|
||||||
|
if(prefix_quote.length == 0){
|
||||||
|
prefix_quote = fullBody.getElementsByClassName("moz-forward-container");
|
||||||
|
}
|
||||||
const prefix_sign = fullBody.getElementsByClassName("moz-signature");
|
const prefix_sign = fullBody.getElementsByClassName("moz-signature");
|
||||||
|
|
||||||
let firstElement = null;
|
let firstElement = null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue