-
-/**
- * This class captures the encoding practices of CRM-5667 in a reusable
- * fashion. In this design, all submitted values are partially HTML-encoded
- * before saving to the database. If a DB reader needs to output in
- * non-HTML medium, then it should undo the partial HTML encoding.
- *
- * This class should be short-lived -- 4.3 should introduce an alternative
- * escaping scheme and consequently remove HTMLInputCoder.
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
- * $Id$
- *
- */
-
-require_once 'api/Wrapper.php';
-class CRM_Core_HTMLInputCoder implements API_Wrapper {
- private static $skipFields = NULL;
-
- /**
- * @var CRM_Core_HTMLInputCoder
- */
- private static $_singleton = NULL;
-
- /**
- * @return CRM_Core_HTMLInputCoder
- */
- public static function singleton() {
- if (self::$_singleton === NULL) {
- self::$_singleton = new CRM_Core_HTMLInputCoder();
- }
- return self::$_singleton;
- }
-
- /**
- * @return array<string> list of field names
- */
- public static function getSkipFields() {
- if (self::$skipFields === NULL) {
- self::$skipFields = array(
- 'widget_code',
- 'html_message',
- 'body_html',
- 'msg_html',
- 'description',
- 'intro',
- 'thankyou_text',
- 'tf_thankyou_text',
- 'intro_text',
- 'page_text',
- 'body_text',
- 'footer_text',
- 'thankyou_footer',
- 'thankyou_footer_text',
- 'new_text',
- 'renewal_text',
- 'help_pre',
- 'help_post',
- 'confirm_title',
- 'confirm_text',
- 'confirm_footer_text',
- 'confirm_email_text',
- 'event_full_text',
- 'waitlist_text',
- 'approval_req_text',
- 'report_header',
- 'report_footer',
- 'cc_id',
- 'bcc_id',
- 'premiums_intro_text',
- 'honor_block_text',
- 'pay_later_receipt',
- 'label', // This is needed for FROM Email Address configuration. dgg
- 'url', // This is needed for navigation items urls
- 'details',
- 'msg_text', // message templates’ text versions
- 'text_message', // (send an) email to contact’s and CiviMail’s text version
- 'data', // data i/p of persistent table
- 'sqlQuery', // CRM-6673
- 'pcp_title',
- 'pcp_intro_text',
- 'new', // The 'new' text in word replacements
- );
- }
- return self::$skipFields;
- }