Answers.Body: <p>You can edit /CRM/Utils/API/HTMLInputCoder.php:
  CRM_Utils_API_HTMLInputCoder->getSkipFields returns a list of fields that will be skipped on encoding. Add an entry for your custom-field to this list prevents the html-input from being escaped. The entry must be "custom_" + custom-field-id.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-27T14:36:50.330Z
Answers.Text: Is there a clean way to do the same?
Answers.UserDisplayName: Bastien Ho
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-02T10:20:50.987Z
Answers.LastActivityDate: 2015-12-02T10:20:50.987Z
Answers.UserDisplayName: Thomas
Body: <p>I need to import HTML formatted content to a custom event field for a larger number of events.</p>
  
  <p>During import via the API, HTML tags are being escaped and rewritten: <code>&lt;a href=“https://example.com“&gt;Linktext&lt;/a&gt;</code> becomes <code>&amp;lt;a href=“https://example.com“&amp;gt;Linktext&amp;lt;/a&amp;gt;</code>.</p>
  
  <p>Is there a way to avoid this and preserve the tags as they are? </p>
  
Tags: <api><import><html>
Title: Can I avoid HTML formatting being escaped during API import?
ThreadText: # Can I avoid HTML formatting being escaped during API import?
  
  (Asked by: username_0 on 2015-10-28)
  
  I need to import HTML formatted content to a custom event field for a larger number of events.
  
  During import via the API, HTML tags are being escaped and rewritten: `<a href=“https://example.com“>Linktext</a>` becomes `&lt;a href=“https://example.com“&gt;Linktext&lt;/a&gt;`.
  
  Is there a way to avoid this and preserve the tags as they are?
  
  **Tags:** api, import, html
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-12-02. Score: 5
  
  You can edit /CRM/Utils/API/HTMLInputCoder.php:
  CRM\_Utils\_API\_HTMLInputCoder->getSkipFields returns a list of fields that will be skipped on encoding. Add an entry for your custom-field to this list prevents the html-input from being escaped. The entry must be "custom\_" + custom-field-id.
  
  > **Comments:**
  > **username_2**: Is there a clean way to do the same?  
  
  ---
  
  