Xataface 2.0 - render HTML in list view

Archived from the Xataface Users forum.

tonyvenneri — Thu Nov 08, 2012 10:27 am

I have a problem in rendering HTML created with ckeditor (but nicedit is the same) in the list view.

Have a look at images attached.
I listview.png I have the html tag. If I go in edit mode (editview.png) I am able to view the correct formattation of text

Any idea?


shannah — Thu Nov 08, 2012 10:53 am

This is a new default for Xataface 2.0 for security reasons. It is better for the world if the default is to escape all html in field output. That way if you have users you don’t trust adding content in your fields, they can’t put in any XSS hacks. This way you have to think before opening it up.

You can enable “passthru” (so that the field is not escaped) using the “passthru” directive in the fields.ini file:

Code: Select all
[myfield] widget:type=ckeditor passthru=1

-Steve


tonyvenneri — Fri Nov 09, 2012 8:36 am

Excellent.
In my application only selected user are able to write content.

Many thanks