APIv4 - Fix html encoding of rich-text fields
authorcolemanw <coleman@civicrm.org>
Wed, 17 May 2023 20:16:09 +0000 (16:16 -0400)
committercolemanw <coleman@civicrm.org>
Wed, 17 May 2023 20:57:01 +0000 (16:57 -0400)
commitb3d7df5dfc0e83aee7f8e325145b7efc62026c99
tree0511aa88179cae63bd7f1dedd3e793b47397d887
parentb1bd2b109b36b91967a1162f2e16739e41f87548
APIv4 - Fix html encoding of rich-text fields

In ece8de2d2 this was fixed but only for APIv3, and with no unit test.
The previous fix also did not cover fields using "TextArea" as their input type,
even though they are allowed to store HTML.
This fixes for APIv4 and v3 and adds a test. and adds a test.
CRM/Core/BAO/CustomField.php
CRM/Utils/API/AbstractFieldCoder.php
CRM/Utils/API/HTMLInputCoder.php
tests/phpunit/api/v4/Custom/BasicCustomFieldTest.php