Hi,
I want to escape HTML in a read-only screen with text fields. For example, a street field like this....
The field displays as static text but does not escape HTML.
I log the fields and see that the type is TextItem, but TextItem doesn't have the setEscapeHTML(boolean) method while StaticTextItem does have that method. Could that be the reason?
The docs for FieldType doesn't include STATICTEXT, but I tried using type="statictext" anyway. It didn't work though.
Is there a way to declare in the ds.xml that a text field should escape HTML?
Thanks,
-chris
I want to escape HTML in a read-only screen with text fields. For example, a street field like this....
Code:
<field name="street" title="Street" type="text" canEdit="false" readOnlyDisplay="static" escapeHTML="true"/>
I log the fields and see that the type is TextItem, but TextItem doesn't have the setEscapeHTML(boolean) method while StaticTextItem does have that method. Could that be the reason?
The docs for FieldType doesn't include STATICTEXT, but I tried using type="statictext" anyway. It didn't work though.
Is there a way to declare in the ds.xml that a text field should escape HTML?
Thanks,
-chris
Comment