Closed (duplicate)
Project:
Organic Groups Mandatory Group
Version:
5.x-1.0-beta
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 May 2007 at 02:12 UTC
Updated:
31 Dec 2007 at 03:15 UTC
The subject of the e-mail to notify admins about new members to the mandatory group is over-encoded, such that group names containing a single quote will be sent with the group containing an HTML entity. For instance, if our group name is "Bob's Group" then the e-mail subject will say "Bob's Group".
This is caused by the placeholder used in the t() function used to create the subject. The module is currently using @, which strips all HTML and encodes certain characters as entities. According to the t() documentation on api.drupal.org, ! would be a better choice.
I can't create a patch at the moment, but the fix is to change:
$subj = t("'@name' joined @site and was assigned to group '@group'.", array('@group' => $node->title, '@name' => $account->name, '@site' => variable_get('site_name', 'drupal')));
to
$subj = t("'!name' joined !site and was assigned to group '!group'.", array('!group' => $node->title, '!name' => $account->name, '!site' => variable_get('site_name', 'drupal')));
Comments
Comment #1
pwolanin commentedIs there any risk of having
<script>tags and such embedded in an e-mail?Comment #2
junyor commentedIn theory, yes. But I think most mail clients are smart enough by this point to disable SCRIPT entirely, if they even support it. And I don't see how there could be problems with SCRIPT in mail subjects, since they are plaintext-only fields.
Comment #3
pwolanin commentedsee: http://drupal.org/node/176088