When there are special HTML characters in the node title/tweet text, the actual tweet looks like this:

Maestro Fresh Wes's "Dearly Departed" hit...

The problem is in tweetbutton_get_attributes() that uses token_replace() with the default options. This causes HTML-escaping of the inserted tokens. The tweet text is escaped again down the road in drupal_attributes() called by l(), hence the undesirable effect.

The attached patch fixeds the issue by telling token_replace() not to sanitize the tokens.

CommentFileSizeAuthor
tweetbutton-double_html_escaping.patch964 bytesjamix

Comments

jamix’s picture

Title: HTML-escapted characters in tweet text » HTML-escaped characters in tweet text

Fixing typo in the issue title.

timmillwood’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)