Skip to content
Snippets Groups Projects
Commit 33a8b69c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Strip control chars/ctrl-A sequences from msg subject in notify()

We may want Ctrl-A sequences in the telegram subject, but not in the message
subject
parent 08933fa8
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -675,7 +675,9 @@ extern "C" int notify(scfg_t* cfg, uint usernumber, const char* subject, const c
SAFEPRINTF(str, "%u", usernumber);
smb_hfield_str(&msg, RECIPIENTEXT, str);
}
smb_hfield_str(&msg, SUBJECT, subject);
char* msgsubj = strip_ctrl(subject, NULL);
smb_hfield_str(&msg, SUBJECT, msgsubj);
free(msgsubj);
add_msg_ids(cfg, &smb, &msg, /* remsg: */NULL);
if(msgbase_open(cfg, &smb, INVALID_SUB, &storage, &dupechk_hashes, &xlat) == SMB_SUCCESS) {
smb_addmsg(&smb, &msg, storage, dupechk_hashes, xlat, (uchar*)text, /* tail: */NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment