When i post as admin i post usualy with the html filter on. So alle my messages have html (paragraphs), i don't want that in twitter. So we should strip all html from %body and %teaser so the tweets wont look like:

<p>test tweet</p>

Comments

Michsk’s picture

please insert strip_tags() function in this module.

webatelier’s picture

work around ...
Make a new input format where you :
- don't allow any HTML except the a tags (if you want links) (via the 'HTML Filter' option in the Input Formats => Edit => Filters setting)
- activate the Twitter #hashtag converter (not mandatory but practical for hash tags)

Give this input format a clear name ('Twitter no html' for instance)

Now install the Better formats module (http://drupal.org/project/better_formats)
allowing you to limit a content type to 1 or more input formats ...

Now IN your preferred content type (the one you use to post to twitter) allow ONLY the new 'Twitter no html' input filter
There you are ...

Michsk’s picture

We don't need a workaround, it just got to work. So strip_tags() is the way to go.

steinmb’s picture

Priority: Critical » Normal
13rac1’s picture

Title: Delete html from %body (probably als %teaser) » Strip HTML from twitter posts
Version: 6.x-3.x-dev » 7.x-5.x-dev