lib/jazrb/jasmine/XMLReporter.js in smparkes-jazrb-0.0.8 vs lib/jazrb/jasmine/XMLReporter.js in smparkes-jazrb-0.0.9

- old
+ new

@@ -12,13 +12,15 @@ var att_str; var re; var result = ''; for (var att in attributes) { - att_value = attributes[att]; - + att_value = attributes[att] || ""; + att_value = att_value.replace(/&/g, "&amp;"); + att_value = att_value.replace(/</g, "&lt;"); + att_value = att_value.replace(/>/g, "&gt;"); // Find first quote marks if any apos_pos = att_value.indexOf(APOS); quot_pos = att_value.indexOf(QUOTE); @@ -150,10 +152,10 @@ puts(" <testcase"+formatAttributes({name:(1+parseInt(i))+ ": " + result.matcherName})+">"); if(!result.passed()){ puts(" <failure"+formatAttributes({type:result.matcherName, message:result.message})+">"); puts("<![CDATA["); - print_exception_trace(result.trace); + puts(get_exception_trace(result.trace)); puts("]]>"); puts(" </failure>"); } puts(" </testcase>"); }