Reputation: 215
I have a simple component that uses a xtype="textfield". In the JSP I am using the cq:text tag along with the escapeXml="true" attribute in order to escape the html characters. This works as it should. However if I start inline editing the component in the browser (not in chrome since it doesn't support it), the escaping no longer works and the html is converted to html code, reverting the escapeXml's action.
Does anyone know if this is a known bug of Inline Editing and what is the work around.
Thanks
Upvotes: 1
Views: 3225
Reputation: 215
Found the solution here. It's part of the cq:inplaceEditing configuration. If you need to fix the escaping, you will have to use plaintext as the editorType or you can simply disable inplaceEditing all together on a per component basis.
This is an example of how you could set your _cq_editConfig.xml
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:actions="[text:Hero Row,-,edit,delete,-,insert]"
cq:dialogMode="floating"
cq:disableTargeting="{Boolean}true"
jcr:primaryType="cq:EditConfig">
<cq:inplaceEditing
jcr:primaryType="cq:InplaceEditingConfig"
active="{Boolean}false"
editorType="plaintext"/>
</jcr:root>
Hope this helps anyone else out there. Don't forget to say thank you
Upvotes: 3