Hi,

I notice that the Twitter website doesn't entity encode ampersands
after retrieving statuses so it basically allows users to enter "
into the text box and instead of seeing " they get " instead.
This leads to problems for us API users.

With my command line client, using JSON, it would still show up as
" which would confuse users who are used to the website's
conversion of entities. So, in order to make my application present
the statuses as they would be shown on the website I have to make it
pretend to be a HTML renderer. This is pretty difficult as different
browsers do things differently, e.g. some render &quot as " instead of
requiring the semicolon.

What I would like to see is the Twitter website start to entity encode
ampersands at presentation time, so that what the users enter in the
text box is what they see after they hit the 'update' button. After
all, the vast majority of users probably don't know what entity
encoding is. I know this request is beyond the scope of this list but
if the current website behaviour is going to be the expected API data
presentation behaviour, I think it should at least be mentioned in the
API docs.

(P.S. I know about the encoding of < and > because it's mentioned in
the API docs so they're no problem, although it really shouldn't need
to be done in my opinion. There are too many assumptions that the
strings are going to be used in a web context.)

Cheers,

-- Andrew

Reply via email to