When a post is posted in HTML mode, the open-graph "description" header displays code in <script> tags.

Before populating the og:description header., it may be good to:

1. Convert the post to raw text (stripping out all HTML).
2. Remove all linefeeds and carriage-returns.
3. Remove all duplicate spaces.

Here's a real-life example.
This is what I'm seeing in the header of one of my posts.
This is posted in HTML mode and contains a script tag at the beginning to pull in some boilerplate text for the post.

This ends up throwing some garbage into the <head> of the HTML page:

HTML
<meta property="og:description" content="document.write(GetPostTemplate_LinkToThis(&quot;http://urlbam.com/ha/2zz&quot;,&quot;http://urlbam.com/ha/1zz&quot;,&quot;Amalgam Fillings &amp;amp; Mercury Poisoning&quot;));


The Smoking Tooth Video
  Did you know that mercury vapor offgasses from amalgam (&amp;quot;silver&amp;quot;...">

Hope this is helpful.

Last edited by mmem700; 02/01/2019 3:10 PM.

Today they call you "crazy".
Tomorrow they call you "ahead of your time".