String (String original) { String text = original.replaceAll("<", "&lt;"); text = text.replaceAll(">", "&gt;"); text = text.replaceAll("&", "&amp;"); text = text.replaceAll("'", "&apos;"); text = text.replaceAll("\"", "&quot;"); text = text.replaceAll("_", "&nbsp;"); assertEquals(original, toDisplay(text)); return text; }