From fdf24efc4bd8f64d0964aca1a0e259bbfacb41d4 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sat, 7 Mar 2015 09:09:06 -0500 Subject: [PATCH] let's get pedantic with this HTML export, shall we? --- core/src/processing/data/Table.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index 2f098c179..39ab885f9 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -1117,8 +1117,11 @@ public class Table { protected void writeHTML(PrintWriter writer) { - writer.println(""); + writer.println(""); +// writer.println(""); +// writer.println(""); + writer.println(""); writer.println(""); writer.println(" "); writer.println(""); @@ -1163,16 +1166,15 @@ public class Table { writer.print(">"); } else if (c == '&') { writer.print("&"); - } else if (c == '\'') { - writer.print("'"); +// } else if (c == '\'') { // only in XML +// writer.print("'"); } else if (c == '"') { writer.print("""); - // not necessary with UTF-8? -// } else if (c < 32 || c > 127) { -// writer.print("&#"); -// writer.print((int) c); -// writer.print(';'); + } else if (c < 32 || c > 127) { // keep in ASCII or Tidy complains + writer.print("&#"); + writer.print((int) c); + writer.print(';'); } else { writer.print(c);