WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Cards Meta
[resolved] Excessive whitespace prior to description (4 posts)

  1. t3g
    Member
    Posted 11 months ago #

    For some of my blog pages, the twitter:description tag has a lot of whitespace before the description text. I was able to fix by adding $desc = trim($desc); before return $desc; in the twcm_get_description function in twitter-cards-meta.php file.

    Just a heads up for a future version. :-)

    http://wordpress.org/extend/plugins/twitter-cards-meta/

  2. t3g
    Member
    Posted 11 months ago #

    In the end, I ended up expanding upon the trim and used this $desc = trim(preg_replace("/\s+/", " ", $desc)); to maintain a space between sentences in description.

  3. M Asif Rahman
    Member
    Plugin Author

    Posted 11 months ago #

    Thank you for the heads up. We will release update ASAP.

    We also have this in Git, you could fork there too.

    https://github.com/ARCommunications/Twitter-Cards-Meta

  4. oneTarek
    Member
    Plugin Author

    Posted 10 months ago #

    We have released new version of this plugin fixing this issue.

Reply

You must log in to post.

About this Plugin

About this Topic