Active
Project:
Email Field
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2007 at 15:41 UTC
Updated:
31 May 2008 at 18:45 UTC
produces an email with html tags included like this:
---------------------------------------------------------
[Title of post - Email] subject of email
username sent a message using the contact form at
http://www.example.com/drupal5/email/12/field_email.
body of email
---------------------------------------------------------
is it supposed to act this way ?
I checked and the regular contact form does not behave like this (its probably independent ? I am not familiar )
Comments
Comment #1
giorgosksorry editor ate my html tags
there are lots of em tags in the body of the email and it looks bad
Comment #2
mh86 commentedyes, it's independant from the contact module. I'll work on that as soon as possible!
Comment #3
john.money commentedProblem is improper (or actually changed) use of the t function. Substitution with %variables will now add the <em> tags via theme_placeholder(). Should be using !variables instead, so for example:
- $subject = t('[%title - %contact] %subject', array('%title' => preg_replace("/\r|\n/",'',$node->title), '%contact' => $types['fields'][$fieldname]['widget']['label'], '%subject' => $edit['subject']));
+ $subject = t('[!title - !contact] !subject', array('!title' => preg_replace("/\r|\n/",'',$node->title), '!contact' => $types['fields'][$fieldname]['widget']['label'], '!subject' => $edit['subject']));
Comment #4
apt94jesse commentedchanging the % variables to ! variables didn't work for me, but adjusting the line in the includes/theme.inc file did. Just take out the
<em>tags.Comment #5
gemini commentedI changed % to ! for the subject and wrapped the body variable into strip_tags() function - that did the trick for the whole email.