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

  1. t3g
    Posted 3 years 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. :-)


  2. t3g
    Posted 3 years 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
    Plugin Author

    Posted 3 years ago #

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

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


  4. oneTarek
    Plugin Contributor

    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Twitter Cards Meta
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic