freebsd-ports/misc/alevt/files/patch-ab
Oliver Lehmann 2a013fa858 update to 1.6.1 which fixes build on RELENG_5
Approved By:	maintainer-timeout (9 days)
2004-08-26 14:11:02 +00:00

16 lines
625 B
Text

--- exp-html.c.orig Tue Oct 17 21:28:30 2000
+++ exp-html.c Tue Aug 17 16:31:33 2004
@@ -268,7 +268,12 @@
{
//if previous nbsp --> put semicolon!!!
if (nbsp) fputc(';',fp);
- fputc(pg->data[y][z].ch,fp);
+
+ // Handle ascii characters which have HTML meanings
+ if (pg->data[y][z].ch == '<') fprintf(fp,"&lt;");
+ else if (pg->data[y][z].ch == '>') fprintf(fp,"&gt;");
+ else if (pg->data[y][z].ch == '&') fprintf(fp,"&amp;");
+ else fputc(pg->data[y][z].ch,fp);
last_space=0;
nbsp=0;
}