Java escape HTML June 14, 2023 by Tarik StringUtils.replaceEach(str, new String[]{"&", "\"", "<", ">"}, new String[]{"&", """, "<", ">"})