aboutsummaryrefslogtreecommitdiffstats
path: root/src/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/html.c')
-rw-r--r--src/html.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/html.c b/src/html.c
index cc10a58..d5798cc 100644
--- a/src/html.c
+++ b/src/html.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.7 2008/02/27 01:52:08 james
+ * *** empty log message ***
+ *
* Revision 1.6 2008/02/20 23:42:05 staffcvs
* *** empty log message ***
*
@@ -74,7 +77,14 @@ html_entity (FILE * f, int c)
fprintf (f, ">");
break;
default:
+
+ if ((c>=32) &&(c<127)) {
fputc (c, f);
+ } else if (c>127) {
+ fprintf (f, "&#x%04x;",c);
+ } else {
+ fputc(' ',f);
+ }
}
}
@@ -109,11 +119,6 @@ html_render (FILE * f, CRT_CA c)
if (c.attr & CRT_ATTR_BOLD)
fprintf (f, "<b>");
- if (c.chr < 32)
- c.chr = 32;
- if (c.chr > 126)
- c.chr = 32;
-
html_entity (f, c.chr);
if (c.attr & CRT_ATTR_BOLD)