Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.2.3
-
Fix Version/s: 3.3.alpha
-
Component/s: Drupal Integration Modules
-
Labels:None
Description
It's probably improper of me to try to solve two problems with one issue, but I didn't learn about the second problem until I solved the first.
Originally I sought to patch civicrm.views.inc to expose more CiviMail fields to Views. The changes I made expose the following fields:
- civicrm_mailing.id (allows users to specify specific e-newsletters they'd like to display via views)
- civicrm_mailing.body_text (actual message content)
- civicrm_mailing.body_html (actual message content)
- civicrm_mailing_component.body_text (display message header and footer)
- civicrm_mailing_component.body_html (display message header and footer)
Then I realized that the HTML content was being escaped in the views output. That is, HTML tags very being displayed on the page.
After a little Googling around, I found this post (http://forum.civicrm.org/index.php/topic,5724.msg49174.html#msg49174), where user Jamie had written some code to resolve this problem for certain CiviEvent fields. I incorporated Jamie's changes into my patch and also include here the file civicrm_handler_field_markup.inc, which belongs in /civicrm/drupal/modules/views/civicrm. I'm not sure how to apply a patch against a nonexistent file, so I'm just uploading the file here.
One problem my patch doesn't solve is what to do with tokens that appear in mailings. I suppose this could be handled by using a field handler specific to CiviMail message contents, but I'm open to suggestions.