I have in my CiviCRM a custom field which is a memo field with a text editor. If I update the contents of this field through the user interface contents is saved correctly as html. E.g.
However when I use the api (for example through the api explorer) the html gets malformed. Entering the same html results in the following:
How do I update the contents of a custom field which should html code?
Update: I disocvered there is an API Wrapper in place which encodes the html input. This wrapper gets executed for every api call. See https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/API/HTMLInputCoder.php#L147
Thanks, Jaap Jansma