Attempt to strip html

This commit is contained in:
Andrew Pamment 2016-08-21 19:32:09 +10:00
parent 8330b03eb1
commit 824cec337d
2 changed files with 11 additions and 0 deletions

View File

@ -340,6 +340,10 @@ char *www_email_display(struct user_record *user, int email) {
for (i=0;i<strlen(body);i++) {
if (body[i] == '\r') {
sprintf(buffer, "<br />");
} else if (body[z] == '<') {
sprintf(buffer, "&lt;");
} else if (body[z] == '>') {
sprintf(buffer, "&gt;");
} else {
sprintf(buffer, "%c", body[i]);
}

View File

@ -7,6 +7,9 @@
#include "bbs.h"
#include "jamlib/jam.h"
#define IN 0
#define OUT 1
extern struct bbs_config conf;
static int new_messages(struct user_record *user, int conference, int area) {
@ -454,6 +457,10 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
for (z=0;z<jmh.TxtLen;z++) {
if (body[z] == '\r') {
sprintf(buffer, "<br />");
} else if (body[z] == '<') {
sprintf(buffer, "&lt;");
} else if (body[z] == '>') {
sprintf(buffer, "&gt;");
} else {
sprintf(buffer, "%c", body[z]);
}