mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
let's get pedantic with this HTML export, shall we?
This commit is contained in:
@@ -1117,8 +1117,11 @@ public class Table {
|
|||||||
|
|
||||||
|
|
||||||
protected void writeHTML(PrintWriter writer) {
|
protected void writeHTML(PrintWriter writer) {
|
||||||
writer.println("<html>");
|
writer.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 3.2//EN\">");
|
||||||
|
// writer.println("<!DOCTYPE html>");
|
||||||
|
// writer.println("<meta charset=\"utf-8\">");
|
||||||
|
|
||||||
|
writer.println("<html>");
|
||||||
writer.println("<head>");
|
writer.println("<head>");
|
||||||
writer.println(" <meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\" />");
|
writer.println(" <meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\" />");
|
||||||
writer.println("</head>");
|
writer.println("</head>");
|
||||||
@@ -1163,16 +1166,15 @@ public class Table {
|
|||||||
writer.print(">");
|
writer.print(">");
|
||||||
} else if (c == '&') {
|
} else if (c == '&') {
|
||||||
writer.print("&");
|
writer.print("&");
|
||||||
} else if (c == '\'') {
|
// } else if (c == '\'') { // only in XML
|
||||||
writer.print("'");
|
// writer.print("'");
|
||||||
} else if (c == '"') {
|
} else if (c == '"') {
|
||||||
writer.print(""");
|
writer.print(""");
|
||||||
|
|
||||||
// not necessary with UTF-8?
|
} else if (c < 32 || c > 127) { // keep in ASCII or Tidy complains
|
||||||
// } else if (c < 32 || c > 127) {
|
writer.print("&#");
|
||||||
// writer.print("&#");
|
writer.print((int) c);
|
||||||
// writer.print((int) c);
|
writer.print(';');
|
||||||
// writer.print(';');
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
writer.print(c);
|
writer.print(c);
|
||||||
|
|||||||
Reference in New Issue
Block a user