summaryrefslogtreecommitdiff
path: root/render/textplain.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-03-15 15:53:20 +0000
committerJames Bursa <james@netsurf-browser.org>2003-03-15 15:53:20 +0000
commit91f8a679db6211b883ce2a7499728ee2b6a5f2af (patch)
treec210a7dbf57352499bda4d5ea97ae24df49d4b5e /render/textplain.c
parente517a39dfbaf633ec449dab351bca094e6be4239 (diff)
downloadnetsurf-91f8a679db6211b883ce2a7499728ee2b6a5f2af.tar.gz
netsurf-91f8a679db6211b883ce2a7499728ee2b6a5f2af.tar.bz2
[project @ 2003-03-15 15:53:20 by bursa]
MIME types for local files, new test files. svn path=/import/netsurf/; revision=107
Diffstat (limited to 'render/textplain.c')
-rw-r--r--render/textplain.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/render/textplain.c b/render/textplain.c
index 84875804c..f6e157466 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -1,5 +1,5 @@
/**
- * $Id: textplain.c,v 1.2 2003/02/25 21:00:27 bursa Exp $
+ * $Id: textplain.c,v 1.3 2003/03/15 15:53:20 bursa Exp $
*/
#include <assert.h>
@@ -8,6 +8,7 @@
#include "libxml/HTMLparser.h"
#include "netsurf/render/html.h"
#include "netsurf/render/textplain.h"
+#include "netsurf/utils/log.h"
static const char header[] = "<html><body><pre>";
@@ -17,7 +18,7 @@ static const char footer[] = "</pre></body></html>";
void textplain_create(struct content *c)
{
html_create(c);
- htmlParseChunk(c->data.html.parser, header, sizeof(header), 0);
+ htmlParseChunk(c->data.html.parser, header, sizeof(header) - 1, 0);
}
@@ -29,7 +30,7 @@ void textplain_process_data(struct content *c, char *data, unsigned long size)
int textplain_convert(struct content *c, unsigned int width, unsigned int height)
{
- htmlParseChunk(c->data.html.parser, footer, sizeof(footer), 0);
+ htmlParseChunk(c->data.html.parser, footer, sizeof(footer) - 1, 0);
c->type = CONTENT_HTML;
return html_convert(c, width, height);
}