Currently we store different formats of data in the activity details column (text, html). We are also planning on storing json-encoded data for the 4.1 release. Pages which display this data need an easy way to determine the content type in order to display it in a readable manner. Use internet media types as the option values ("text/plain", "text/html", "application/json" are the options we'll use for now).
1. New column for civicrm_activity
- content_type VARCHAR
- insert new column
- update existing activity records and assign either "text/plain" or "text/html" depending on whether HTML tags are present in the data
3. Send Email / CiviMail
- Assign appropriate content_type to inserted activities
4. Change case custom data - insert activity (http://issues.civicrm.org/jira/browse/CRM-8508)
- Assign content_type = "application/json"
5. View Activity
- Surround 'Details' display with <pre> </pre> tags if content_type is NOT text/html.