| 1402 | |
| 1403 | |
| 1404 | protected void writeEntryHTML(PrintWriter writer, String entry) { |
| 1405 | //char[] chars = entry.toCharArray(); |
| 1406 | for (char c : entry.toCharArray()) { //chars) { |
| 1407 | if (c == '<') { |
| 1408 | writer.print("<"); |
| 1409 | } else if (c == '>') { |
| 1410 | writer.print(">"); |
| 1411 | } else if (c == '&') { |
| 1412 | writer.print("&"); |
| 1413 | // } else if (c == '\'') { // only in XML |
| 1414 | // writer.print("'"); |
| 1415 | } else if (c == '"') { |
| 1416 | writer.print("""); |
| 1417 | |
| 1418 | } else if (c < 32 || c > 127) { // keep in ASCII or Tidy complains |
| 1419 | writer.print("&#"); |
| 1420 | writer.print((int) c); |
| 1421 | writer.print(';'); |
| 1422 | |
| 1423 | } else { |
| 1424 | writer.print(c); |
| 1425 | } |
| 1426 | } |
| 1427 | } |
| 1428 | |
| 1429 | |
| 1430 | protected void saveODS(OutputStream os) throws IOException { |