Hi,
I have a richtext area and like to pull this from a json. My problem are double quotes in the text, they give me errors and I can't seem to find how to replace them with single quotes.
I tried to use the same logic as I used to remove multiple lines without any result.
I have a richtext area and like to pull this from a json. My problem are double quotes in the text, they give me errors and I can't seem to find how to replace them with single quotes.
- Code: Select all
<cms:editable name='content' label='content' desc='write here something' order='2' type='richtext' toolbar='full' no_xss_check='1'></cms:editable>
// text in richtext <p class="html">test</p>
// <p>line 2</p>
//json incl. remove multiple lines
<cms:content_type "application/json"/>
[<cms:pages masterpage='pages.php' id='17'>
<cms:set rtext="<cms:php>
echo(str_replace( \"\r\n\", ' ', \"<cms:show content/>\" ));
</cms:php>" />
{"pagetitle":"<cms:addslashes><cms:show k_page_title/></cms:addslashes>",
"content":"<cms:addslashes><cms:show rtext/></cms:addslashes>"
}<cms:if "<cms:not k_paginated_bottom/>">,</cms:if>
</cms:pages>
]
// the ajax- json response for the content
[ { "content": "<p class="html">test</p> <p>line 2</p>" } ]
I tried to use the same logic as I used to remove multiple lines without any result.