Closed (fixed)
Project:
Subscriptions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2009 at 21:51 UTC
Updated:
6 Jun 2009 at 02:44 UTC
I'm not sure if this is a mail_edit issue or date or subscriptions issue (this is related, but technically a different issue: http://drupal.org/node/416290).
I go to administer->site building->mail templates and configure the digest template to include a date.
When the date is printed in the digest email, it contains HTML tags, even though the user's account is configured to receive e-mail in plain text only:
Title: MPAA: Box Office Up 5.2%, Foreign Ticket Sales Dominate
<span class="date-display-single">04/01/2009</span>
TheWrap.com : Foreign now comprises 65 percent of the industry total -- an
increase of 17 percent over the last five years.
I uninstalled mimemail, but the date is still wrapped in these tags. Any ideas on how to remove these tags from the date printed in the digest?
Comments
Comment #1
salvisYou mean a cck date field?
subscriptions_cck.module uses the following code
to try to retrieve the field data in 'plain' format. If nothing is returned, it then asks for the 'default' format. Please take this information to the queue of the cck module that supplies your date field and ask there, why you're getting the span tags.
Comment #2
somebodysysop commentedOK, it appears that the date field is being wrapped in html tags by default by the date.module.
However, I have a cck text field which contains quotation marks that appears in the same digest email as follows:
I know that the text is being entered in plain text format because I have disabled wysiwyg editor from this node field.
I posted this question in the cck forum along with the note from salvis @ #1 above. Here is the response I received:
So, this bounces me back here. Is there some reason why the subscriptions_cck.module code would html encode quotation marks in a cck textarea field that is marked as plain? No, that's not a good question. What reason is it that this cck text field entered as plain text is being html encoded even though mimemail is not installed and user account specifies plain text emails?
Comment #3
salvisAlways post links to other issues when you refer to them (or even better: move the issue back and forth). I'm past the age of hide and seek...
Let's take a step back and leave subscriptions_cck out of the picture for a moment. When you put quotes into a node title and body, are they encoded as entities or delivered as plain quotes?
What's the URL of the page where you specify this?
Comment #4
somebodysysop commentedSorry. I thought I had posted the relevant information here.
I posted this issue: http://drupal.org/node/436238 as a result of the advice @ #1 above. Originally the problem was with a cck date field. But, I realized that I had a similar problem (unwanted html encoding) with a cck text field.
We do not recall any problems with html encoding of node title and body. That is, the title and body of my nodes always appear correctly (no html encoding) in digests.
When mimemail.module is installed, it adds a setting in the user account to
: http://members.amptp.org/user/**uid**/edit
Comment #5
salvisFirst hand information is always best. Keeping one problem in one issue and moving that issue between projects is an ingenious way of keeping all involved parties up-to-date and all information in one place.
Do you not recall any problems or have you actually tested it?
I don't specifically distrust mimemail.module, but since the issue concerns mimemail.module's core business, the next logical step is to test whether you can get quotes and double-quotes past it.
Comment #6
somebodysysop commentedI have mimemail installed on another site that shares the problem site's code base (i.e., same versions of subscriptions, cck and date module). I just tested. So:
With mimemail installed: subscriptions digest represents quotation marks from title and body correctly.
With mimemail not installed: subscriptions digest represents quotation marks from title and body correctly.
The problem appears to be related to cck field values (date and text specifically) continuing to be html encoded when mimemail is not installed.
Comment #7
salvisOk, thanks. I'm waiting for a reply to #436238-3: HTML coding in plain text emails.
Comment #8
salvisWould it help to pass the cck field values through the check_plain() function?
Comment #9
salvis@SomebodySysop: You closed #436238: HTML coding in plain text emails and haven't shown any interest in pursuing this any further, so let's close this as well.
Comment #10
somebodysysop commentedSorry for the delayed response. It appears that this will require effort from the cck folks to fix, and they haven't shown any interest in that.
For people who may find themselves in the same boat, what I finally did was to configure the mails to be sent in plain text, but installed the htmlmail module. What this does is wrap the emails in tags. What that does, effectively, is to display the fields that are html encoded the way they should look (i.e., no tags displayed).
This is working.
Thanks for your help.