If you're never going to show a tweet in a HTML context, it would be safe to
unescape the entitized characters. Tweets are often fed directly from an API
call to an HTML context, which is why we protect against malicious HTML by
escaping certain tags. Storing as received is likely the best bet.

@episod <http://twitter.com/intent/user?screen_name=episod> - Taylor
Singletary


On Thu, Aug 4, 2011 at 11:10 PM, Jason Toy <jason...@gmail.com> wrote:

> I see how to fix it,I have to html unescape the tweet, is it safe to
> html unescape  all tweets ?
>
> On Aug 4, 4:58 pm, Jeremy Dunck <jdu...@gmail.com> wrote:
> > Characters are not necessarily a single byte.  Which are you counting?
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Aug 4, 2011 at 5:05 PM, Jason Toy <jason...@gmail.com> wrote:
> > > I see some tweets going through my system that are over 140
> > > characters, for example tweet id: 86955808553844736  is 284
> > > characters.
> > > Here is the actual tweet:
> > > "&lt;*)))&gt;&lt; &lt;*)))&gt;&lt; &lt;*)))&gt;&lt; &lt;*)))&gt;&lt;
> > > &lt;*)))&gt;&lt; &lt;*)))&gt;&lt; &lt;*)))&gt;&lt; &lt;*)))&gt;&lt;
> > > &lt;*)))&gt;&lt; &lt;*)))&gt;&lt; &lt;*)))&gt;&lt; &lt;*)))&gt;&lt;
> > > &lt;*)))&gt;&lt; &lt;*)))&gt;&lt; &lt;*)))&gt;&lt; &lt;*)))&gt;&lt;
> > > #phish #sbix"
> >
> > > Do I need to encode it a special way to get it to fit under 140
> > > characters or does this restriction not apply anymore?  My processing
> > > engine expects tweets to be under 140 characters.
> >
> > > --
> > > Have you visited the Developer Discussions feature onhttps://
> dev.twitter.com/discussionsyet?
> >
> > > Twitter developer links:
> > > Documentation and resources:https://dev.twitter.com/docs
> > > API updates via Twitter:https://twitter.com/twitterapi
> >
> > > Unsubscribe or change your group membership settings:
> http://groups.google.com/group/twitter-development-talk/subscribe
>
> --
> Have you visited the Developer Discussions feature on
> https://dev.twitter.com/discussions yet?
>
> Twitter developer links:
> Documentation and resources: https://dev.twitter.com/docs
> API updates via Twitter: https://twitter.com/twitterapi
>
> Unsubscribe or change your group membership settings:
> http://groups.google.com/group/twitter-development-talk/subscribe
>

-- 
Have you visited the Developer Discussions feature on 
https://dev.twitter.com/discussions yet?

Twitter developer links:
Documentation and resources: https://dev.twitter.com/docs
API updates via Twitter: https://twitter.com/twitterapi

Unsubscribe or change your group membership settings: 
http://groups.google.com/group/twitter-development-talk/subscribe

Reply via email to