Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

Found 1 of 139 records in table Wiki
Now Showing 1 of 1

Current Record: Clean_the_html_for_the_export

Clean the HTML to export data


Clean HTML tags and entities to export your data

  1. Override the display() of the field to strip the tags... but this would affect all parts of the application where the HTML fields are displayed.
  2. Create a grafted field, then override its display to show the stripped contents of the HTML area field.

e.g. in the fields.ini:

    __sql__ = "select t.*, null as stripped_field from mytable t"

        visibility:csv = visible

Then in the delegate class:

    function stripped_field__display($record){
        return html_entity_decode(strip_tags($record->val('original_field')), ENT_QUOTES, 'UTF-8');
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2021 All rights reserved