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 <[email protected]> wrote:
>> 
>> 
>> Hi,
>> 
>> I've noticed that some venue names have XML entities like &rsquot; in them.  
>> For example, "TT the Bear&rsquo;s" venue id "V0-001-001643784-2".
>> 
>> In the /events/search API, this comes back as "TT the Bear&amp;amp;rsquo;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