Social Sharing Toolkit
Bugfix: Open Graph excerpt needs htmlspecialchars() (1 post)

  1. BramNL
    Posted 2 years ago #

    Starting at line 513, the excerpt might break HTML if a read more link is included. This might result in, for example:

    <meta property="og:description" content="Lorem ipsum, etc… <a href="http://example.com/">read more <span class="meta-nav">→</span></a>"/>

    As you can see, this is not valid HTML.

    Fix: add htmlspecialchars():

    if ($excerpt != '') {
    				echo '
    		<meta property="og:description" content="'.htmlspecialchars($excerpt).'"/>';

    Possibly there are more vars that needs sanitizing.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Social Sharing Toolkit
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.