semifor / Net-Twitter

A Perl interface to the Twitter APIs
83 stars 37 forks source link

XML character entities in text #33

Closed boethin closed 11 years ago

boethin commented 11 years ago

In the status text field, the character '&' (ampersand) appears as '&' (XML character entity).

semifor commented 11 years ago

That's right. Twitter intentionally sends HTML encoded entities to make statuses "safe" for web display. It's a bother if that's not what you want.

To automatically decode them, pass decode_html_entities => 1 to Net::Twitter->new.

boethin commented 11 years ago

ups, oh, next time I'll read the API manual first :)