Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1

I have a editable field on my couchCMS backend:

<cms:editable name='col1_load' label='Column 1: load' type='text' order='30' />

If I write there and save a word with quotation marks like:

it outputs on the code:

I want it to output "news" (with quotation marks) and not the hexadecimal version of those characters.
How can I fix this? Sorry, was looking trough documentation and couldn't find a solution.

Thank you!
Just found a solution! Posting it below:

The key would be to use type 'textarea' with 'no_xss_check' param set to '1', e.g. as follows -

Code: Select all
<cms:editable name='embed_video' label='Video embed code' type='textarea' no_xss_check='1' />

As far as the display of the text is concerned, on the front-end you'll see "news" (although, doing a view-source will indeed reveal that the actual code being outputted is &quot;news&quot;). It does not matter for the browser as it treats both the versions as same.

Where is *would* matter is if you try and use the output as literal code e.g. as JavaScript or PHP.
I suspect that is something you are trying to do.

If so, for that purpose please use type 'textarea' instead making sure to set its 'no_xss_check' param to '1' e.g. as shown in the following post -

Hope this helps.

P.S. It appears that were able to find a solution as I was in the process of making my reply :) I'll still retain my post as it sheds some more light on the issue.
3 posts Page 1 of 1