Email subject contain '<'em '>' tag
leoman730 - January 11, 2008 - 21:54
| Project: | Survey |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
After creating a new survey (title: Test Suvery for example )and specify who receive the result, then has someone to fill out the result then click submit. What happen is the email I recived has a '<'em'>' surround the title on the subject line, is there's a way to strip the em tag off??
Many thanks.

#1
line 332 is $subject = t('%survey submission', array('%survey' => $survey->title));
so apparently $survey->title has the tags
#2
Hi Jerimee,
Yeah, I agree that $survey->title has the tags, but i want to know if there a way i can turn that off by not modify the module itself. Such as through admin->settings...
Thanks.
#3
Yes, this is perplexing. I'm getting the same thing and don't know why. The survey title as it's set up (http://www.ecologicalgardens.com/join_community) does NOT have italics anywhere. I see the code mentioned in the response in the survey.module file. But I don't see anything in there that's creating italics around the title either. I don't mind a minor hack of that (or another) file if necessary, but am unsure of what needs to be done. Any help would be appreciated.
Jim
#4
Actually I am seeing this as part of the emailfield use on my site and I do not have survey module on or even present.
It may have to do with email field module itself if that is used by survey or email field.
EDIT: Sure enough, check this out:
http://drupal.org/node/159467
#5
Hi zoologico,
Thanks for doing what the developer should have done a long time ago, and reply to this thread! Your link is helpful, but I don't think it solves my problem. Although we are using CCK for another part of the site, the Survey and Form modules don't touch it, AFAIK.
If I understood PHP more, maybe I could go looking in the those modules' files and try something based on your referenced link. I do know for every other site we've used these modules, there haven't been any problems like this. So it's definitely weird -- luckily not a show stopper, it just looks bad for the client (and us by extension)....
Jim
#6
I don't use those modules, but you should try looking for the places in the survey.module file where thre is something like:
%name
%form
%title
%contact
%subject
And change the to:
@name
@form
@title
@contact
@subject
Respectively.
This is what fixed the other issue for me.
Also, take it easy on the developer since most people do this on their spare time (the little we have left after all other life commitments).
I hope they will address it and it turns out to be easier for them to troubleshoot after reading this thread.
Good luck.
-Miguel
#7
Hi Miguel,
Thanks for the reply, and I appreciate your words in defense of the developer :) Now, I looked through the survey.module file and didn't see anything like what you mentioned. The closest thing I could find was:
* Implementation of hook_form
*/
function survey_form(&$node) {
$form = array();
$form['title'] =
array(
'#type' => 'textfield',
'#title' => t('Title'),
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => -5
);
I was thinking about changing the "#"s into "@"s, but am not confident enough it will fix the problem to actually do it (unless you think I should). Overall, I think this is the area where the e-mail title is controlled. Do you see anything else there that might be addding those tags???
Best,
Jim
#8
See http://drupal.org/node/185847 for more about this issue.
See http://api.drupal.org/api/function/t/6 for an explanation and solution.
Doug
#9
Don't change those.
I don't think it will break your site beyond repair, but that module will most definitely not work.
Please try what WiredEscape links us to here and get back to us to see if it helped you. Hopefully it does.
#10
Survey module is no longer being maintained, use Webform module instead.
---Closing down issue queue of survey module---