planetdump: prevent the ESC char 27 (0x1b) from getting into the output
authorJon Burgess <jburgess777@gmail.com>
Sat, 29 Mar 2008 12:59:19 +0000 (12:59 +0000)
committerJon Burgess <jburgess777@gmail.com>
Sat, 29 Mar 2008 12:59:19 +0000 (12:59 +0000)
planet.c

index bff1299..a2fc816 100644 (file)
--- a/planet.c
+++ b/planet.c
@@ -86,6 +86,7 @@ const char *xmlescape(char *in)
             case  '<': strncat(escape_tmp, "&lt;",   left); break;
             case  '>': strncat(escape_tmp, "&gt;",   left); break;
             case  '"': strncat(escape_tmp, "&quot;", left); break;
+            case  '\033': strncat(escape_tmp, "?", left); break;
             default: escape_tmp[len] = *in;
         }
         in++;