Twitter Feed: Embedded Timeline WordPress Plugin
[resolved] Hash tags get confused with HTML entities (5 posts)

  1. Cowboy_X
    Posted 2 years ago #

    I have a client who is using coded entities in his tweets — like & #8212; to do an em-dash. These are getting interpreted by the plugin as hash tags leading to "#8212" and breaking up the feed. (I assume they're being generated by a cruddy Twitter client that isn't converting entities to UTF-8.)

    I was able to fix this by editing your plugin by adding a space in your regular expression for detecting hash tags. A better version would check for the non-existence of an ampersand before the string, but I'm lazy.

    Ever wonder what is exactly meant by the 'flipped classroom'?

    Ever wonder what is exactly meant by the &<a href="http://twitter.com/search?q=%23039" rel="nofollow">#039</a>;flipped classroom&<a href="http://twitter.com/search?q=%23039" rel="nofollow">#039</a>;?

    line 208, edited:
    $tweet = preg_replace("( #([a-zA-Z0-9\_]+))", " <a href=\"http://twitter.com/search?q=%23\\1\" rel=\"nofollow\">\</a>", $tweet);


  2. mmapes
    Posted 2 years ago #

    Thanks, Cowboy_X. Hope this gets added to the new version. Mine was apostrophes turning into #039;.

    Note that encoding="yes" does NOT fix the problem.

  3. Nanette Kalisvaart
    Posted 2 years ago #

    Hi Cowboy_X,
    Would you know what I would need to change to prevent '&' being
    displayed as '& amp;' (but then withouth the space)?

  4. dkromero
    Posted 2 years ago #

    Thank you Cowboy_X, with this amend works perfect.

  5. Alex Moss
    Plugin Author

    Posted 2 years ago #

    Hey guys - I've just updated to 1.2.2. Use decode="yes" in the shortcode to apply this fix.

    Thanks guys :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Twitter Feed: Embedded Timeline WordPress Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.