Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
When I try to output a text field from a Test Result Related Item that contains rich content to an HTML report, all of the < and > are replaced by < and >. This happens with some other characters also. How do you get it to preserve the HTML instead of doing this conversion? Below is where I am trying to use it. Basically I'm trying to output all ALM_Defect items from a test session. This doesn't happen for fields on the Test Session itself though.
<%begintestresultdetail verdict=&combinedverdictfilter %>
<%begintestresultitemdetail%>
<table>
<script type="text/javascript">
<!--
var itemId = "<%testresultitem ID%>";
var itemType = "<%testresultitem Type%>";
var desc = "<%testresultitem ALM_Description%>";
if (itemType == "ALM_Defect") {
document.write("<tr><td class='noBorder'>" + itemId + "</td><td class='noBorder'>" + desc + "</td></tr>");
}
-->
</script>
</table>
<%endtestresultitemdetail%>
<%endtestresultdetail%>
Solved! Go to Solution.
Please ensure your resort recipe starts with
<html>
and end with
</html>
This affect the "interpretation of richt content" by the report generator.
If you write an XML report, you need an element
<html>TRUE</html>
to get the same effect.
HTH Matthias
The report does have the html tags. It's a properly formatted html report. Other rich content fields that come directly from the test session render just fine. It's only the rich content fields that are related through test result items that are replacing the < and > (as well as some other characters).