summaryrefslogtreecommitdiffstats
path: root/misc/alevt/files/patch-ab
blob: b499e4a160a40008b69a5d0a2e27ce8ea1023c09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- 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;
 		  }
OpenPOWER on IntegriCloud