public static String escapeHTML(String in) {
		StringBuilder s = new StringBuilder();
		for (int i = 0; i < in.length(); i++) {
			char c = in.charAt(i);
			switch(c) {
				case '&': s.append(amp); continue;
				case '\'': s.append(apos); continue;
				case '<': s.append(lt); continue;
				case '>': s.append(gt); continue;
				case '\\': s.append("\\"); continue;
				case '"': s.append("\""); continue;
			}
			s.append(c);
		}
		return s.toString();
	}