og:description 'content' unterminated string literal
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5296402/unterminated-string-literal">unterminated string literal</a>  </p>
</blockquote>



<p>I have a problem setting og:description with followed function...</p>

<pre><code>function createFacebookMeta($title, $fcUrl, $fcImg, $fcDesc){    
    $fcDesc = (strlen($fcDesc) &gt; 100) ? substr($fcDesc,0,150).'...' : $fcDesc;
    $faceBook = "&lt;script type=\"text/javascript\"&gt;


$(document).attr('title', '".$title."');
$('meta[property=\"og:title\"]').attr('content', '".$title."');
$('meta[property=\"og:url\"]').attr('content', '".$fcUrl."');
$('meta[property=\"og:image\"]').attr('content', '".$fcImg."');
$('meta[property=\"og:description\"]').attr('content', '".$fcDesc."');
FB.XFBML.parse();
&lt;/script&gt;";
echo $faceBook;
}
</code></pre>

<p>as response i get in firebug </p>

<p>unterminated string literal</p>

<pre><code> $('meta[property="og:description"]').attr('content', 'Logos gedruckt&lt;br /&gt;  //breaks here
</code></pre>

<p>even if i use striptags it reports same ... if i don´t set og:description default meta description is taken (np here) which is about the same lenght, as i read that fb takes arround 300 chars from it max</p>

<p>thank you</p>

<p>$fcDesc is db result</p>

<pre><code>$fcDesc = "Logos gedruckt
&lt;br&gt;
100% Baumwolle
&lt;br&gt;
Vorne: Logo
&lt;br&gt;
Rücken: Cash Ruls";
</code></pre>

<p>(product description)</p>
