Bugfix: Open Graph excerpt needs htmlspecialchars()
-
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.
- The topic ‘Bugfix: Open Graph excerpt needs htmlspecialchars()’ is closed to new replies.