Skip to content
Snippets Groups Projects
Commit d247a257 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 264d6390
Branches
Tags
No related merge requests found
......@@ -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.
Please register or to comment