| 1382 | |
| 1383 | |
| 1384 | protected void writeEntryHTML(PrintWriter writer, String entry) { |
| 1385 | //char[] chars = entry.toCharArray(); |
| 1386 | for (char c : entry.toCharArray()) { //chars) { |
| 1387 | if (c == '<') { |
| 1388 | writer.print("<"); |
| 1389 | } else if (c == '>') { |
| 1390 | writer.print(">"); |
| 1391 | } else if (c == '&') { |
| 1392 | writer.print("&"); |
| 1393 | // } else if (c == '\'') { // only in XML |
| 1394 | // writer.print("'"); |
| 1395 | } else if (c == '"') { |
| 1396 | writer.print("""); |
| 1397 | |
| 1398 | } else if (c < 32 || c > 127) { // keep in ASCII or Tidy complains |
| 1399 | writer.print("&#"); |
| 1400 | writer.print((int) c); |
| 1401 | writer.print(';'); |
| 1402 | |
| 1403 | } else { |
| 1404 | writer.print(c); |
| 1405 | } |
| 1406 | } |
| 1407 | } |
| 1408 | |
| 1409 | |
| 1410 | protected void saveODS(OutputStream os) throws IOException { |