Possible Duplicate:
unterminated string literal
I have a problem setting og:description with followed function...
function createFacebookMeta($title, $fcUrl, $fcImg, $fcDesc){
$fcDesc = (strlen($fcDesc) > 100) ? substr($fcDesc,0,150).'...' : $fcDesc;
$faceBook = "<script type=\"text/javascript\">
$(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();
</script>";
echo $faceBook;
}
as response i get in firebug
unterminated string literal
$('meta[property="og:description"]').attr('content', 'Logos gedruckt<br /> //breaks here
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
thank you
$fcDesc is db result
$fcDesc = "Logos gedruckt
<br>
100% Baumwolle
<br>
Vorne: Logo
<br>
Rücken: Cash Ruls";
(product description)