I'm refering to the question JSON-LD: Using data:post.body in Blogger template.
Surprisingly, <data:post.body>
can be used in the meantime. But now I have a new problem: How to eliminate tags, linefeeds and special characters and replace characters like '
and "
?
I found something in the kind of the following instead of directly write JSON-LD code, but it does not work:
<script type='text/javascript'>
var thisDdoesNotWork = removeHtmlTags_And_ChangeSomeCharacters("<data:post.body/>");
var el = document.createElement('script');
el.type = 'application/ld+json';
el.text = JSON.stringify({
"v1":"thisWorks",
"v2":"<data:post.thisWorksToo/>",
"v3":thisDdoesNotWork});
document.querySelector('head').appendChild(el);
Someone an idea?