Page 1 of 2
problem with sendgrid js
Posted: Tue Jan 28, 2014 6:22 pm
by Michael4771079
Hi,
I have the following js to gather the info and presented it in a readable way in the email. It was working on the 21st of jan.
Here are some screenshots, the code, the way the email presented on the 21st, and the way the email is presenting now.
What do I need to change in the code to get back readable emails ?
cheers
problem with sendgrid js
Posted: Tue Jan 28, 2014 6:28 pm
by maxkatz
You should debug the code and see why new lines are not inserted. It could also be something on the SendGrid side. Debugging custom JavaScript code is outside the scope of our support. We are starting to enforce this rule more strictly now.
problem with sendgrid js
Posted: Wed Jan 29, 2014 5:13 pm
by Michael4771079
Hi
I made a change on sendgrid dashboard and got my linebreaks back,
the only problem is the "+" signs.
I added this to the js .replace(/\+/g, "")
here are s/s of the code with the adjustment and the resulting email,
adding this code didnt help, can anyone advise on this?
thx
problem with sendgrid js
Posted: Wed Jan 29, 2014 7:42 pm
by Kateryna Grynko
Hi Michael,
This is a jQuery bug.
According to w3c documentation http://www.w3schools.com/tags/ref_url... space could be encoded in two different ways:
'URLs cannot contain spaces. URL encoding normally replaces a space with a plus sign or with %20.'.
There is a ticket in jquery issue tracking tool related to the same problem: http://bugs.jquery.com/ticket/3400
This ticket is 5 year old and was reopened 8 days ago. We use jquery since first release and inherited URL encoding mechanism from jquery. There is no any custom implementation now or it the nearest past.
If you need another behavior you may patch jquery library on the Source tab (see ticket from bugs.jquery.com I mentioned above).
problem with sendgrid js
Posted: Wed Jan 29, 2014 8:27 pm
by Michael4771079
thx Katya,
thx for telling me that
problem with sendgrid js
Posted: Wed Jan 29, 2014 8:54 pm
by Michael4771079
Hi Katya,
I came across this on overflow
http://stackoverflow.com/questions/25...
it this what you mean to patch
problem with sendgrid js
Posted: Thu Jan 30, 2014 11:19 am
by Maryna Brodina
Hello Michael! We're checking this issue at the moment, perhaps this is caused by changes of Proxy implementation. Someone will get back to this post with update.
problem with sendgrid js
Posted: Thu Jan 30, 2014 12:39 pm
by Michael4771079
Thank you Maryna,
FYI, I asked sendgrid if they had made any changes since 21st jan
http://community.sendgrid.com/sendgri...
problem with sendgrid js
Posted: Thu Jan 30, 2014 12:52 pm
by Maryna Brodina
Thank you, we'll check from our side as well.
problem with sendgrid js
Posted: Fri Jan 31, 2014 2:00 pm
by Maryna Brodina
Hello Michael! The problem seems to be on our end... working on it.