signatures still need voodoo for bgcolor and such
This commit is contained in:
@@ -294,8 +294,9 @@ ${html_entities.encode(message.body).replace("\n", "<br>")}
|
|||||||
<br>
|
<br>
|
||||||
<br>`;
|
<br>`;
|
||||||
if (message.signature) {
|
if (message.signature) {
|
||||||
if (wtvshared.isHTML(message.signature)) data += `<embed src="wtv-mail:/get-signature?message_id='+messageid+'">`;
|
if (wtvshared.isHTML(message.signature)) data += `<wtvnoscript>`;
|
||||||
else data += message.signature;
|
data += message.signature;
|
||||||
|
if (wtvshared.isHTML(message.signature)) data += `</wtvnoscript>`;
|
||||||
}
|
}
|
||||||
data += `<p>
|
data += `<p>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ Location: wtv-mail:/sendmail`;
|
|||||||
var msg_subject = request_headers.query.message_subject || null;
|
var msg_subject = request_headers.query.message_subject || null;
|
||||||
var msg_body = request_headers.query.message_body || null;
|
var msg_body = request_headers.query.message_body || null;
|
||||||
var to_name = request_headers.query.whatever_webtv_sends_this_as || null;
|
var to_name = request_headers.query.whatever_webtv_sends_this_as || null;
|
||||||
var no_signature = (request_headers.query.togglesign == "true") ? false : true; // opposite webtv
|
var no_signature = false;
|
||||||
|
if (request_headers.query.togglesign == "true") no_signature = false;
|
||||||
var mail_draft_data = ssid_sessions[socket.ssid].getSessionData("mail_draft");
|
var mail_draft_data = ssid_sessions[socket.ssid].getSessionData("mail_draft");
|
||||||
var mail_draft_attachments = ssid_sessions[socket.ssid].getSessionData("mail_draft_attachments") || {};
|
var mail_draft_attachments = ssid_sessions[socket.ssid].getSessionData("mail_draft_attachments") || {};
|
||||||
if (mail_draft_data) {
|
if (mail_draft_data) {
|
||||||
@@ -412,8 +413,9 @@ vlink=#62B362
|
|||||||
vspace=0
|
vspace=0
|
||||||
hspace=0>`;
|
hspace=0>`;
|
||||||
if (ssid_sessions[socket.ssid].getSessionData("subscriber_signature") && ssid_sessions[socket.ssid].getSessionData("subscriber_signature") != "" && !no_signature) {
|
if (ssid_sessions[socket.ssid].getSessionData("subscriber_signature") && ssid_sessions[socket.ssid].getSessionData("subscriber_signature") != "" && !no_signature) {
|
||||||
if (wtvshared.isHTML(ssid_sessions[socket.ssid].getSessionData("subscriber_signature"))) data += `<embed src="wtv-mail:/get-signature" transparent>`;
|
if (wtvshared.isHTML(ssid_sessions[socket.ssid].getSessionData("subscriber_signature"))) data += `<wtvnoscript>`;
|
||||||
else data += ssid_sessions[socket.ssid].getSessionData("subscriber_signature");
|
data += ssid_sessions[socket.ssid].getSessionData("subscriber_signature");
|
||||||
|
if (wtvshared.isHTML(ssid_sessions[socket.ssid].getSessionData("subscriber_signature"))) data += `</wtvnoscript>`;
|
||||||
}
|
}
|
||||||
data += `
|
data += `
|
||||||
<td abswidth=2 bgcolor=#000000>
|
<td abswidth=2 bgcolor=#000000>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Mail settings
|
|||||||
<tr>
|
<tr>
|
||||||
<td abswidth=6>
|
<td abswidth=6>
|
||||||
<td abswidth=92 absheight=76>
|
<td abswidth=92 absheight=76>
|
||||||
<table absheight=76 cellspacing=0 cellpadding=0>
|
<table href="wtv-home:/home" absheight=76 cellspacing=0 cellpadding=0>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right>
|
<td align=right>
|
||||||
<img src="${minisrv_config.config.service_logo}" width=87 height=67>
|
<img src="${minisrv_config.config.service_logo}" width=87 height=67>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class WTVShared {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isHTML(str) {
|
isHTML(str) {
|
||||||
return /<\s*([^ >]+)[^>]*>.*?<\s*\/\s*\1\s*>/.test(str);
|
return /<[a-z][\s\S]*>/i.test(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
returnAbsolutePath(check_path) {
|
returnAbsolutePath(check_path) {
|
||||||
|
|||||||
Reference in New Issue
Block a user