email_content error in API

Highlighted
Occasional Participant

Re: email_content error in API

Note, I do understand the need for security and please excuse my frustration. Sorry for the odd styling , somewhere that style became necessary for some email client somewhere. It is quite possible that this is no longer an issue as this newsletter has been going out for years. Will be taking a look. Suggestion... If there are issues like this (border not allowed in tags) and other non-standard html - how about an error that says just that? IE, "border css element ...tag" I don't think these types of issues involve security and they are definitely not a "script" iss...
Highlighted
Moderator

Re: email_content error in API

That's really good feedback.  We'll take a look at the error message and add some additional color to it to give better direction in the future.  Thanks again for your patience and great feedback along the way.  Let us know anything else you think we can do better on or add, always interested in feedback!

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Participant

Re: email_content error in API

Removed the "border='0'" from all of the tags. No change, same error.
Highlighted
Moderator

Re: email_content error in API

I used this HTML and was able to create the campaign in my account.  Are you able to do the same or still having problems?  https://gist.github.com/daveberard/6174108

 

Here is the JSON payload I used as well if you want to compare: https://gist.github.com/daveberard/6174147

 

If you update some of the information in that JSON payload you should be able to use that directly and compare with your JSON payload.  The last link to HTML you posted didn't actually contain a link to your HTML, so if you could update that we can run that through as well and see if there is something else failing validation that we didn't catch.

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Participant

Re: email_content error in API

Here is a link to the newsletter with the change per your response... http://www.whrobinsoninc.com/amusementtoday/newsletter_display.php?date=2013-08-07
Highlighted
Moderator

Re: email_content error in API

I'm not getting any errors on validation on that HTML.  I can use it in my test campaign creation JSON just by encoding it and using it, see this Gist example JSON for a working example using your exact HTML: https://gist.github.com/daveberard/6184633

 

Do you have a sample of your JSON that is failing the validation you can put up on Gist or somewhere else?  Please make sure any personal information is removed in anything you publish on the forums.  I'm wondering if there is some sort of JSON encoding issue that is going on that is manifesting in a strange way here. 

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Occasional Visitor

Re: email_content error in API

Hi. 

 

As it stands, this issue is still unresolved for about 3 weeks now (just from my knowledge). We self-diagnosed one issue that had to do with a mis-spelling (stye instead of style). This shouldn't have caused an issue, but for whatever reason, it did. Now, the issue has reoccurred in multiple places and is ultimately causing our system to fail. 

 

I've targeted the simplest code I could find in order to eliminate any other potential issues and found that this is failing: https://gist.github.com/sdover102/6308314 . At this point, my hope is that you guys can take care of it in some fashion, although I feel it's a bit too late. Unfortunately, we've invested a lot in your system, with at least a weekly email going out to 60,000 users...and are stumped by this "unsolvable" issue. 

 

Any help you can provide today would be much appreciated. As a side note, a previous post on this thread went into a fair amount of detail about how my html could look askew in Outlook / etc. While this advice is appreciated, it is a distraction from the true problem, which is the fact that emails are not making it into your system because of an erroneous "Field does not support script content" error. 

 

Thank you.

 

Highlighted
Moderator

Re: email_content error in API

Tested out your HTML, looks like it is cellborder="0" which is causing the problem (ran the HTML through a validator to find the invalid tags, that came up as a non-standard tag).  Once I removed that, had no problems.  Here is the sample JSON I used: https://gist.github.com/daveberard/265237089cbf20c418aa

 

Here is the validator I used to check to see if there were any non-standard tags/attributes in the code: http://validator.w3.org/check.  You should never receive this failure if you have validated your HTML code and passed with 0 errors and also don't contain any JavaScript in your HTML.

 

We are more than happy to add any valid tags and attributes to our validator, we will even add non-standard ones that are browser specific or used for specific browser hacks, tricks or otherwise.  However, we do validate based on HTML/XHTML standards by default and have chosen to put specific exceptions for non-standard HTML instead of allowing anything in.  This is to prevent anyone from using any sort of hacks or tricks that could cause injection attacks, rendering hacks in our product or other email clients or any other behavior that could be considered malicious.  We also took your feedback on the error message and will be updating it in our next release to better explain the failure. 

 

I apologize for the furstration and inconvenience here.  There is a balance between security and developer flexibility that we are trying to work though.  I know this doesn't help you with your specific experience, but I did want to make sure you understand why we are being conservative and restrictive.  Since we are allowing 3rd parties to provide us with content that is both sent out from our servers to end users as well as display this content in our UI, we are very cautious to make sure everything coming into our product and sent out from our mailers contain nothing that could be malicious. 

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Developer

Re: email_content error in API

I ran my code through http://validator.w3.org/check and received 0 errors and there is no javascript in the content. I am still receiving json.invalid.value.no_script_tags:#/email_content: Field does not support script content.

 

Here's my html: https://gist.github.com/anonymous/68cca1409e78a6903f15

Highlighted
Moderator

Re: email_content error in API

Thanks for submitting that, we'll take a look and see what we can find.  Will update soon.

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Register for our "Making Sense of Online Marketing for Retail" Webinar

Join us on Thursday, August 13th at 2pm ET for a free webinar where we'll discuss how to incorporate online marketing into your retail store.

Read More
Featured