Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Address Group Include Also Breaks With Glinks3

Quote Reply
Address Group Include Also Breaks With Glinks3
Another thing breaking in Gossamer Mail when Glinks 3 GT Libs are included:

Compose New Mail.
Include Address From Address Group

<someone@somedomain.com>, <someoneelse@someotherdomains.com> becomes

&lt;someone.......&gt;,&lt;domeoneelse......&gt and this sort of address definitely when inclued from the Address Group or even if a single address is selected from Address Book cannot be sent mail to ....

Remove Glinks 3 rom mod_perl and everything is back to as it should be ....

More surprises in store. Hope nothing is breaking in WAP template sets becuse of this .... Testing on wap template set is a pain... and it had taken us months to debug the broken wap template sets as wap templates were never a priority for GT

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================

Last edited by:

HyperTherm: Apr 3, 2005, 2:55 PM
Quote Reply
Re: [HyperTherm] Address Group Include Also Breaks With Glinks3 In reply to
It's happening because of a change in GT::Template. escape_js was incorrectly not html escaping strings that weren't string references. The other side of the bug is that Gossamer Mail wasn't passing the string in as a reference. It's been a few months since I've worked with Gossamer Mail, but I'll get a patch out for this tomorrow.

Adrian
Quote Reply
Re: [brewt] Address Group Include Also Breaks With Glinks3 In reply to
Thanks.
I am sure that wap templates would not need a retesting as testing on actual phones is a pain. emulators are too crude to really throw the errors. deckit et al all showed the original wap templates to be fine but it never really worked on actual phone sets. It was something to do with &amp; replacing & all over the templates wpuld have to dig out the exact details though as to what was done.

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Address Group Include Also Breaks With Glinks3 In reply to
There's a simple fix for this, however, it only works with the new libraries (ie. if you switch back to the old libraries, you'll have to undo the change).

You need to change templates/common/address.js, near the top change:
Code:
var EscapedEmail = {
<%if address_list_len%>
<%loop address_list%><%if address_html_quoted%>
"<%address_aid%>" : "<%escape_js address_html_quoted%>"<%unless last%>,<%endunless%>
<%endif%><%endloop%>
<%endif%>
};
to
Code:
var EscapedEmail = {
<%if address_list_len%>
<%loop address_list%><%if address_html_quoted%>
"<%address_aid%>" : "<%escape_js unescape_html address_html_quoted%>"<%unless last%>,<%endunless%>
<%endif%><%endloop%>
<%endif%>
};

Adrian
Quote Reply
Re: [brewt] Address Group Include Also Breaks With Glinks3 In reply to
A correction to why this is happening. escape_js was actually incorrectly html unescaping the string that it was processing. So with newer libraries, if you wanted it to be html unescaped, you need to do that unescape yourself (ie. <%escape_js foo%> becomes <%escape_js unescape_html foo%>).

Adrian
Quote Reply
Re: [brewt] Address Group Include Also Breaks With Glinks3 In reply to
Thanks This is fixed.

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [brewt] Address Group Include Also Breaks With Glinks3 In reply to
Similar happening in msgs_body.htm when the From link is clicked
GMail 2.2.4

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Address Group Include Also Breaks With Glinks3 In reply to
It is also the same case with escapeURL/escape_url, those need to be changed to <%escape_url unescape_html ...%>

Adrian
Quote Reply
Re: [brewt] Address Group Include Also Breaks With Glinks3 In reply to
Thanks.
Fixed

One more issue which would need your attn:
http://www.gossamer-threads.com/...orum.cgi?post=280075

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================