newline in meta description results in an error
ste101 opened this issue · 6 comments
If the is a newline in meta description this error will be shown in HTML:
Decoding the string to json didn't result in a array. Please check if 'decodeOptions', 'addSlashes' and 'stripSlashes' should be further specified.
@ste101 Can you give a scenario, how this error can be reproduced? I set the meta description of a page to a multi-line text and added this in a Fluid template:
<schema:type.thing description="{data.description}"/>
Also with PHP:
$type->setProperty('description', "some text\nanother text");
But everything is fine.
Sorry I wasn't accurate enough, a newline in the page meta tag description field.
Are you sure the new line is the problem? Perhaps you have other characters in the string (maybe not visible) which throws the error.
What is your actual code to generate the markup? Can you provide an example (with text)?
Sorry, my fault. It was a problem of another extension.