send demotext outside of sanitation so that the user can preview what links on the page may look like

This commit is contained in:
zefie
2022-10-14 00:05:15 -04:00
parent ab0a0fb614
commit 6cfb0b7b42
2 changed files with 3 additions and 4 deletions

View File

@@ -5,8 +5,7 @@ var errpage = null;
var messageid = request_headers.query.message_id || null;
if (!messageid) {
// get user signature
data = session_data.getSessionData("subscriber_signature");
if (request_headers.query.demotext) data += "<br>" + request_headers.query.demotext;
data = session_data.getSessionData("subscriber_signature");
} else {
// get message signature
var message = session_data.mailstore.getMessageByID(messageid);
@@ -17,7 +16,7 @@ if (!messageid) {
if (request_headers.query.sanitize) {
var message_colors = session_data.mailstore.getSignatureColors(data)
data = wtvshared.sanitizeSignature(data).replace("<html>", `<html><body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>`);
if (request_headers.query.demotext) data += "<br>" + request_headers.query.demotext;
}
if (!errpage) {
headers = `200 OK

View File

@@ -102,7 +102,7 @@ font=proportional>${session_data.getSessionData("subscriber_signature") || ""}</
<tr>
<TD>
<td colspan=3 height=2 valign=top align=left bgcolor="0D0D0D">
${(request_headers.query.preview) ? `<b>Signature Preview:</b><br><br><embed src="wtv-mail:/get-signature?sanitize=true&demotext=${encodeURIComponent(`This is a preview of your signature. You can <a href="wtv-setup:/mail-signature">edit it here</a>.`)}" height=40></embed><br><br>` : ''}
${(request_headers.query.preview) ? `<b>Signature Preview:</b><br><br><embed src="wtv-mail:/get-signature?sanitize=true&demotext=${encodeURIComponent(`This is a preview of your signature.<br><a href="client:donothing">This is what a link looks like</a>.`)}" height=40></embed><br><br>` : ''}
<img src="wtv-home:/ROMCache/Spacer.gif" width=436 height=1>
<TR>
<TD>