SmartClient Pro 9.0 - (2013-10-23)
I am creating a detailViewer using some data that was provided by users. For this reason, some of the text fields in the detailViewer need to have escapeHTML = true, so that layout is not broken by the occasional inclusion of something that could be interpreted as a tag.
The situation I'm seeing is that when the data value is blank: "", the field will literally display " " in the field in the viewer.
It goes away when you set escapeHTML = false, but we need it to escapeHTML.
I would expect that if the value of the field in the record is blank, then it should display nothing.
Here's how to duplicate:
(Set it to use detailData[2] and set escapeHTML = false for the "Description" field if you want to understand why we need escapeHTML to be set)
I am creating a detailViewer using some data that was provided by users. For this reason, some of the text fields in the detailViewer need to have escapeHTML = true, so that layout is not broken by the occasional inclusion of something that could be interpreted as a tag.
The situation I'm seeing is that when the data value is blank: "", the field will literally display " " in the field in the viewer.
It goes away when you set escapeHTML = false, but we need it to escapeHTML.
I would expect that if the value of the field in the record is blank, then it should display nothing.
Here's how to duplicate:
Code:
var detailData = [
{
"PayeeName": "Robert",
"RejectTitle": "Insufficient funds",
"Description": "Reimbursement"
},
{
"PayeeName": "MEDICAL CENTER",
"RejectTitle": "Insufficient funds",
"Description": ""
},
{
"PayeeName": "UNIVERSAL",
"RejectTitle": "Insufficient funds",
"Description": "Bad HTML: </table>"
},
{
"PayeeName": "PHYSICAL THERAPY",
"RejectTitle": "Insufficient funds",
"Description": ""
}
]
var ON_HOLD_DETAIL_FIELDS = [
{
name: "PayeeName",
title: "Payee Name",
type: "text",
escapeHTML: true,
width: "*"
},
{
name: "RejectTitle",
title: "Reason for Pending",
type: "text",
width: "*"
},
{
name: "Description",
title: "Transaction Description",
type: "text",
escapeHTML: true,
width: "*"
}
]
isc.DetailViewer.create({
fields: ON_HOLD_DETAIL_FIELDS,
data: detailData[1],
width: 400
});
Comment