Voting code flaw in email

Ytown

New Member
Hi,

The voting code that is sent to members is appearing with flaws (see below). That is how it appears in the email, not inside a text box, the way it appears on the page the loads immediately after signing up.

Brackets for the HTML code are being replaced with other characters, like: <

Members would need to know enough about HTML to fix this before changing the code on their own sites. I don't think they'd have the know-how to do this. It's going to be hard enough to get them to change the old code as it is. Can you help?

Thanks.



Preview: <a href="http://tarot100.com/members/">Tarot100.com<img src="http://tarot100.com/members/button.php?u=test3&buttontype=text" alt="Tarot100.com" border="0" style="display: none;" width="1px" height="1px"/></a>
<br /><br />
<textarea readonly="readonly" name="code" rows="6" style="width: 100%;" onclick="select_all();">&lt;a href="http://tarot100.com/members/">Tarot100.com&lt;img src="http://tarot100.com/members/button.php?u=test3" alt="Tarot100.com" style="display: none;" width="1px" height="1px" />&lt;/a></textarea>
<hr />
Preview: <a href="http://tarot100.com/members/"><img src="http://tarot100.com/members/button.php?u=test3&buttontype=static" alt="Tarot100.com" /></a>
<br /><br />
<textarea readonly="readonly" name="code" rows="6" style="width: 100%;" onclick="select_all();">&lt;a href="http://tarot100.com/members/">&lt;img src="http://tarot100.com/members/button.php?u=test3&buttontype=static" alt="Tarot100.com" />&lt;/a></textarea>
 

Mark

Administrator
Staff member
yikes, that is not happening on any of my lists or client lists I am working on. &lt; is always replaced with <

I am going to do some testing on your list now. Will post back shortly
 

Mark

Administrator
Staff member
Confirmed, the email being sent is not render properly since we switched to UTF-8 Charset. The link code after join works fine.

I will have a patch for this in 7.1 release asap.

thanks for the bug report!
 

Ytown

New Member
Hi Mark,

Any suggestions for admin settings to avoid the problem just until the patch comes out? I currently have the admin set up to approve everyone because I'm manually adding everyone in. I'm using their own email when I add their site so that the code will be sent directly to them.

Thanks!
 

Mark

Administrator
Staff member
Sure, open sources/misc/skin.php

find:

PHP:
    mail($email, $subject, $body, $headers, "-f{$CONF['your_email']}");
Add this BEFORE:
PHP:
    $body = str_replace('&lt;', '<', $body);
 

Ytown

New Member
Hi Mark,

Thanks for this fix. It worked. Still have a problem with the code though. The preview code appears as code, not as an image that my visitors can see in their email message. Likewise the voting code appears with text box code around it. This is exactly what it looks like in the email:

<hr />
Preview: <a href="http://tarot100.com/members/">Tarot100.com<img src="http://tarot100.com/members/button.php?u=test3&buttontype=text" alt="Tarot100.com" border="0" style="display: none;" width="1px" height="1px"/></a>
<br /><br />
<textarea readonly="readonly" name="code" rows="6" style="width: 100%;" onclick="select_all();"><a href="http://tarot100.com/members/">Tarot100.com&lt;img src="http://tarot100.com/members/button.php?u=test3" alt="Tarot100.com" style="display: none;" width="1px" height="1px" /></a></textarea>
<hr />
Preview: <a href="http://tarot100.com/members/"><img src="http://tarot100.com/members/button.php?u=test3&buttontype=static" alt="Tarot100.com" /></a>
<br /><br />
<textarea readonly="readonly" name="code" rows="6" style="width: 100%;" onclick="select_all();">&lt;a href="http://tarot100.com/members/"><img src="http://tarot100.com/members/button.php?u=test3&buttontype=static" alt="Tarot100.com" /></a></textarea>
<hr />



<br /><br />



I do have HTML enabled for incoming emails. I tested using my own email program as well as Hotmail. Both show the code just like above. To be clear, I don't care about a preview. I just can't have this any more complicated than necessary or my members will either get confused and send me a thousand emails or simply not use it at all. Is the text box and preview stuff necessary? I don't know. If email programs overall have changed then maybe it is. My old program just emails the plain code inline with no textbox, but it is a dinosaur. If you can tell me how to fix this or how to edit the extraneous stuff out so just the code is included in the email minus the textbox and preview stuff that would at least be a start. Thanks, Heather
 

Mark

Administrator
Staff member
hmm I wonder why no other users are reporting this issue? The welcome mail when I join my lists simply advises the member to login to the user_cp and get their button code instead of presenting the link code, I'll need to investigate this closer and see if I can figure out what is different about your list. Give me a couple more days to investigate, we're short staffed here at the moment.
 
Top