Thanks, Chris.
 
I've seen this issue surface in a bunch of different ways including the 
following examples.
 
- Tony V's Garage - "V0-001-002123194-1"
- BJ\'s Bingo - "V0-001-004458341-8"
- Danny&39;s Pub - "V0-001-002241355-1"
- Woody's on the Water - "V0-001-002212041-1"
- Romeo's Bar & Grill - "V0-001-002032900-9"
- Engel's Pub - "V0-001-001987156-0"
- Mari's Place - "V0-001-002062024-5"
- Slades Bar & Grill - "V0-001-000893868-3"
- Harvest Café - "V0-001-000636877-4"
 
Some of these venues look like this on the website, too, but others like 
Harvest Café look correct on the website, but come back in the API like Harvest 
Café.  The & entity gets correctly decoded to & and then I'm 
left with "Harvest Café".  Slades Bar & Grill has the same problem.  The 
& comes back in the API like Slades Bar & Grill.  The & gets 
correctly decoded to & and then I'm left with Slades Bar & Grill.
 
It seems like there's some double encoding happening somewhere.
 
Mike

----------------------------------------
> Subject: Re: [api-developers] XML Entities in Venue Names
> From: [email protected]
> Date: Mon, 15 Nov 2010 11:49:58 -0800
> To: [email protected]
>
> Hi Mike and Alex,
>
> Looking into this, I notice that the actual venue name we have stored is "TT 
> the Bear’s", with the double-encoding included. The ampersand gets 
> (correctly) escaped in the XML output, but the underlying data is still a 
> problem. Thanks for letting us know about it.
>
> It looks like this particular venue was added by an API partner, and hasn't 
> been modified in years. I've fixed the data to eliminate the entity encoding:
>
> http://eventful.com/cambridge_ma/venues/tt-the-bears-/V0-001-001643784-2
> http://api.eventful.com/rest/venues/search?app_key=test_key&keywords=svid:V0-001-001643784-2
> http://api.eventful.com/rest/venues/get?app_key=test_key&id=V0-001-001643784-2
>
> If you have more examples, please send them to me and I'll make sure they're 
> cleaned up.
>
> Cheers,
> ~chris
>
> On Nov 15, 2010, at 11:24 AM, Alex Matulich wrote:
>
> > I noticed that too. I can work around it by doing a string replace of
> > "&" with "&" on all venue names returned in a query, but I
> > shouldn't have to.
> >
> > As to why it happens, I'll speculate that it looks like the back-end
> > software (assuming PHP) is doing an unnecessary call to htmlentities()
> > as the data goes out. The call need only happen once, the first time
> > the name gets stored in the database.
> >
> > -Alex
> >
> > On Mon, Nov 15, 2010 at 10:58, Mike Battista wrote:
> >>
> >>
> >> Hi,
> >>
> >> I've noticed that some venue names have XML entities like &rsquot; in 
> >> them. For example, "TT the Bear’s" venue id "V0-001-001643784-2".
> >>
> >> In the /events/search API, this comes back as "TT the Bear’s".
> >>
> >> This seems to be a problem on http://www.eventful.com/ and in the API.
> >>
> >> Was wondering why this happens and/or if there is a best practice for 
> >> handling this with the API.
> >>
> >> Mike
> >
>
>                                         

Reply via email to