Fix for nbsp in messages
This commit is contained in:
parent
0d26b5b06c
commit
8583ab6737
@ -91,7 +91,7 @@ int www_send_email(struct user_record *user, char *recipient, char *subject, cha
|
||||
uname(&name);
|
||||
|
||||
for (char *p = ibody; *p != '\0'; ++p) {
|
||||
if (*p == 0xc2 && *(p+1) == 0xa0) {
|
||||
if ((*p & 0xff) == 0xc2 && (*(p + 1) & 0xff) == 0xa0) {
|
||||
stralloc_append1(&sa, ' ');
|
||||
p++;
|
||||
} else if (*p != '\n') {
|
||||
|
@ -1119,7 +1119,7 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference,
|
||||
|
||||
// remove nbsp
|
||||
while (*p != '\0') {
|
||||
if (*p == 0xc2 && *(p + 1) == 0xa0) {
|
||||
if ((*p & 0xff) == 0xc2 && (*(p + 1) & 0xff) == 0xa0) {
|
||||
stralloc_append1(&unhtmlized, ' ');
|
||||
p++;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user