html tags in !node_teaser and other variables.

DREAMER_ES - October 2, 2009 - 08:00
Project:Comment Notify
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:patch (to be ported)
Description

comment_notify doesn't checks that the node teaser or other variables don't contain HTML tags even if it sends the mail using plain text.

Applying drupal_html_to_text() to the variables that can contain HTML, as suggested in other bug reports in the matter, fixes the issue.

AttachmentSize
comment_notify.module.patch2.07 KB

#1

greggles - October 2, 2009 - 16:07

I marked #417396: Sends html tags in email as a duplicate of this. The patch no longer applies and I think ignored the need to render the content before stripping tags (what if people use a input format filter?).

Here's an alternate patch against the HEAD branch (i.e. 6.x-1.x-dev) which I think provides these features a bit more properly but which hasn't been tested thoroughly. Any testers?

#2

greggles - October 2, 2009 - 16:08
Status:patch (to be ported)» needs review

Oh, also, "to be ported" is for situations where the patch has been applied to 6.x-1.x-dev and needs to be ported (rewritten a bit) before it can be committed to 5.x-1.x-dev (both version numbers are examples). So, this is in "needs review" status.

#3

rapsli - October 20, 2009 - 09:50
Status:needs review» reviewed & tested by the community

works fine for me.
Tested it on the latest stable version 6.x-1.2

I mean, there's not that much that can go wrong with this patch ;)

#4

greggles - October 20, 2009 - 14:50
Assigned to:DREAMER_ES» greggles
Status:reviewed & tested by the community» needs review

Actually that last patch doesn't commit any more and I seem to have failed to upload my own patch...

AttachmentSize
593958_html_to_text_comment_notify.patch 2.62 KB

#5

greggles - October 20, 2009 - 22:08
Status:needs review» patch (to be ported)

Now committed to 6.x http://drupal.org/cvs?commit=277482

#6

greggles - October 20, 2009 - 22:09
Version:7.x-1.x-dev» 5.x-2.x-dev

#7

greggles - November 7, 2009 - 00:58
Assigned to:greggles» Anonymous

To be ported, but not by me.

 
 

Drupal is a registered trademark of Dries Buytaert.