Answers.Body: <p>Drupal is very secure/paranoid when it comes to outputting html/text. I suspect that the views/field integration for the entity (i.e the activity civicrm entity) might need to be updated to allow the html through without any filtering.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-23T08:22:52.213Z
Answers.Text: Thanks for your answer. It seems like quite a complex problem to solve!
Answers.UserDisplayName: Ben
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-23T20:41:12.407Z
Answers.Text: Maybe, but perhaps one of the smarter civi drupal people will see this and have a better clue of where to fix it.
Answers.UserDisplayName: Alan Dixon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-20T19:03:25.133Z
Answers.LastActivityDate: 2021-04-20T19:03:25.133Z
Answers.UserDisplayName: Alan Dixon
Body: <p>I am trying to display in a Drupal (8) view the content of emails that have been sent to contacts using the contact Send Email action. I am using the details field from the activity to show the content. The problem is that the view is outputting the HTML from the email and not rendering it. So it is showing for example <code>&lt;p&gt;Some text here &lt;a href=&quot;...&quot;&gt;A link&lt;/a&gt;&lt;/p&gt;</code>.</p>
  <p>Is there any way I can get it to render the HTML instead of outputting it? The formatter options for the field are only &quot;Default&quot; or &quot;Trimmed&quot;. I did try overidding the individual field twig template but couldn't get this to work. I wasn't sure whether it would be possible using this method.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-19T20:17:41.533Z
Comments.Text: Under 'rewrite' you should see an option for 'Strip HTML tags' - does that help? suspect not, but worth mentioning
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-21T08:08:05.887Z
Comments.Text: Ticking the option for 'Strip HTML tags' makes no difference to the output. The HTML tags are still displayed.
Comments.UserDisplayName: Ben
Tags: <drupal-views><drupal-8><civicrm-entity>
Title: Drupal View Not Rendering HTML From Activity Email Details Field
ThreadText: # Drupal View Not Rendering HTML From Activity Email Details Field
  
  (Asked by: username_0 on 2021-04-19)
  
  I am trying to display in a Drupal (8) view the content of emails that have been sent to contacts using the contact Send Email action. I am using the details field from the activity to show the content. The problem is that the view is outputting the HTML from the email and not rendering it. So it is showing for example `Some text here A link`.
  
  Is there any way I can get it to render the HTML instead of outputting it? The formatter options for the field are only "Default" or "Trimmed". I did try overidding the individual field twig template but couldn't get this to work. I wasn't sure whether it would be possible using this method.
  
  **Tags:** drupal-views, drupal-8, civicrm-entity
  
  > **Comments:**
  > **username_1**: Under 'rewrite' you should see an option for 'Strip HTML tags' - does that help? suspect not, but worth mentioning  
  > **username_0**: Ticking the option for 'Strip HTML tags' makes no difference to the output. The HTML tags are still displayed.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-04-20. Score: 0 | Accepted answer
  
  Drupal is very secure/paranoid when it comes to outputting html/text. I suspect that the views/field integration for the entity (i.e the activity civicrm entity) might need to be updated to allow the html through without any filtering.
  
  > **Comments:**
  > **username_0**: Thanks for your answer. It seems like quite a complex problem to solve!  
  > **username_2**: Maybe, but perhaps one of the smarter civi drupal people will see this and have a better clue of where to fix it.  
  
  ---
  
  