Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

problem with sendgrid js

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

Image

Image

Image

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

problem with sendgrid js

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.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

problem with sendgrid js

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

Image

Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

problem with sendgrid js

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).

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

problem with sendgrid js

thx Katya,
thx for telling me that

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

problem with sendgrid js

Hi Katya,
I came across this on overflow
http://stackoverflow.com/questions/25...
it this what you mean to patch

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

problem with sendgrid js

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.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

problem with sendgrid js

Thank you Maryna,
FYI, I asked sendgrid if they had made any changes since 21st jan
http://community.sendgrid.com/sendgri...

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

problem with sendgrid js

Thank you, we'll check from our side as well.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

problem with sendgrid js

Hello Michael! The problem seems to be on our end... working on it.

Return to “Issues”