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

listing fails if the title attribute has an ampersand (&) on it. #29

Open
Wulfshade opened this issue May 30, 2019 · 0 comments
Open

listing fails if the title attribute has an ampersand (&) on it. #29

Wulfshade opened this issue May 30, 2019 · 0 comments

Comments

@Wulfshade
Copy link

Hi,

I've been using this gem for the past two years and never had an issue I could not solve,... until now.

I'm trying to create listings where the title has the ampersand character and it fails with the response error message:
nested exception is: \n\torg.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference."

I have tried everything I can think of to escape the "&" but it always fails with the same error.

Here is the title of the listing I've been using to try and sort out the problem:
"Black & Decker Vacuum Cleaner Carpet Upholstery tapestry Tool Attachment"

I have tried all of the following:
title.gsub("&", "&")
title.gsub("&", "&")
title.gsub("&", "%26")

Tried with .encode('utf-8') before the gsub, after the gsub, tried without the encode, etc

Am I missing something obvious here? Any help will be greatly appreciated as I'm running out of ideas.

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

1 participant