Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchJobService upload containing objects with "&" can't be serialized #116

Closed
geropeter opened this issue Jan 23, 2016 · 2 comments
Closed
Assignees

Comments

@geropeter
Copy link

I have an XML product feed, which I was trying to process with BatchJobService, but in many cases an exception was thrown, saying "unterminated entity reference". This happened before the objects were uploaded to AdWords, so I took a look at the XmlSerializer utility, because I traced back the issue to ConvertObjectToElement method, line 83:

$element->nodeValue = self::ConvertObjectToNodeValue($object);

This assigning failes in case of an object wich has attributes containing the '&' character. I have used htmlspecialchars($string, ENT_XML1, 'UTF-8') on those fields, so the exception is not thrown anymore.

Shouldn't this be handled by the util class?

@fiboknacky
Copy link
Member

Will look into this. Thanks for reporting.

@fiboknacky
Copy link
Member

Fixed with release version 8.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants