Gossamer Forum
Quote Reply
HTML message bug
If I create an HTML message using the AutoRespond built-in WYSIWYG editor, it automatically converts any < and > symbols to the HTML equivalents (&lt; and &gt;). Do of course, when I attempt to put someone's name in a message using <%Name%> it actually gets converted to &lt;%Name%&gt; and then doesn't get parsed when the message is actually sent.

If I change the HTML message content directly in the database and put the tags back to how they should be, it works fine.

Also, after putting any of the message tags into an HTML message, when I go back to edit the message again, the editor strips out the tags.

*-*-*-*-*-*-*-*-*-*-*
Servicepals.com is an online community for serving and retired military men and women. Visit us at http://www.servicepals.com. Development by Rawnet Limited
*-*-*-*-*-*-*-*-*-*-*
Quote Reply
Re: [servicepals] HTML message bug In reply to
Yes, this is a bug that will be fixed in the next version. Let the tags stay as &gt; and &lt;, don't rechange them in the database because then as you said, you won't see them when you edit a message because html thinks that <anything> is an html tag.

Here is the fix:

In the Leads.pm file found in the private/Autores directory, find the subroutine "sub send_one_lead_email"

then in that subroutine find the lines that look like this:

$msg->{Message} =~ s/<%(.*?)%>/$in_cfg->{$1}/g;
$msg->{HTML_Message} =~ s/<%(.*?)%>/$in_cfg->{$1}/g;
$msg->{HTML_Message} =~ s/\&lt;%(.*?)%\&gt;/$in_cfg->{$1}/g;
$msg->{Subject} =~ s/<%(.*?)%>/$in_cfg->{$1}/g;

and copy this in their place:

$msg->{Message} =~ s/<%(.*?)%>/$in_cfg->{$1}/g;
$msg->{Message} =~ s/\&lt;%(.*?)%\&gt;/$in_cfg->{$1}/g;
$msg->{HTML_Message} =~ s/<%(.*?)%>/$in_cfg->{$1}/g;
$msg->{HTML_Message} =~ s/\&lt;%(.*?)%\&gt;/$in_cfg->{$1}/g;
$msg->{Subject} =~ s/<%(.*?)%>/$in_cfg->{$1}/g;

Mel
Mel Goulet
Developer - Gossamer Threads, Inc.
Quote Reply
Re: [Mel_g] HTML message bug In reply to
Mel,
I am having a problem with the tags not showing up in HTML messages. They disappear after I save.

I checked Leads.pm and the fix posted here is the same as what I have. How can I have those tags show up?
Thanks,
Jon
Jon D. Graham
AutoRespond-It!

Quote Reply
Re: [Mugdock] HTML message bug In reply to
Hi,
Can you please email me all your information so that I can have a look, I believe you have my email address already.
Thanks,
Mel
Mel Goulet
Developer - Gossamer Threads, Inc.