@@ -294,10 +294,7 @@ public void testXmlEscapeToJson(){
294294 "<euro>A €33</euro>" +
295295 "<euroX>A €22€</euroX>" +
296296 "<unknown>some text ©</unknown>" +
297- // TODO: Looks like a strictMode regression where embedded single quotes are not handled correctly
298- // Should be fixed.
299- // "<known>" " & ' < ></known>"+
300- "<known>" " & < ></known>" +
297+ "<known>" " & ' < ></known>" +
301298 "<high>𝄢 𐅥</high>" +
302299 "</root>" ;
303300 String expectedStr =
@@ -306,10 +303,7 @@ public void testXmlEscapeToJson(){
306303 "\" euro\" :\" A €33\" ," +
307304 "\" euroX\" :\" A €22€\" ," +
308305 "\" unknown\" :\" some text ©\" ," +
309- // TODO: Looks like a strictMode regression where embedded single quotes are not handled correctly
310- // Should be fixed.
311- // "\"known\":\"\\\" \\\" & ' < >\"," +
312- "\" known\" :\" \\ \" \\ \" & < >\" ," +
306+ "\" known\" :\" \\ \" \\ \" & ' < >\" ," +
313307 "\" high\" :\" 𝄢 𐅥\" " +
314308 "}}" ;
315309
@@ -323,12 +317,9 @@ public void testXmlEscapeToJson(){
323317 */
324318 @ Test
325319 public void testJsonToXmlEscape (){
326- // TODO: Looks like a strictMode regression where embedded single quotes are not handled correctly
327- // Should be fixed.
328320 final String jsonSrc = "{\" amount\" :\" 10,00 €\" ,"
329321 + "\" description\" :\" Ação Válida\u0085 \" ,"
330- // + "\"xmlEntities\":\"\\\" ' & < >\""
331- + "\" xmlEntities\" :\" \\ \" & < >\" "
322+ + "\" xmlEntities\" :\" \\ \" ' & < >\" "
332323 + "}" ;
333324 JSONObject json = new JSONObject (jsonSrc );
334325 String xml = XML .toString (json );
@@ -342,8 +333,7 @@ public void testJsonToXmlEscape(){
342333 assertTrue ("Escaping á failed. Not found in XML output." , xml .contains ("á" ));
343334 // test XML Entities converted
344335 assertTrue ("Escaping \" failed. Not found in XML output." , xml .contains (""" ));
345- // TODO: restore when the regression is fixed
346- // assertTrue("Escaping ' failed. Not found in XML output.", xml.contains("'"));
336+ assertTrue ("Escaping ' failed. Not found in XML output." , xml .contains ("'" ));
347337 assertTrue ("Escaping & failed. Not found in XML output." , xml .contains ("&" ));
348338 assertTrue ("Escaping < failed. Not found in XML output." , xml .contains ("<" ));
349339 assertTrue ("Escaping > failed. Not found in XML output." , xml .contains (">" ));
0 commit comments