Forum Discussion

Yulia-Anaplan's avatar
4 years ago

Unicode instead of left and right tags

Greetings,

One of our admins is experiencing a weird issue in the custom content inside the Admin section.
When they open custom content for changing a parameter of the <@component ... />, left and right tags convert into &lt; and /&gt;


So, instead of 
<@component ... />

they get 

&lt;@component .../&gt;

It happens with only tags around components.
If we wrap a component into <div>, divs will be ok, but the component's tags will be switched to &lt; and /&gt;

Example:

<div>
    <@component id="..." />
</div>

will become:

<div>
    &lt;component id="..." /&gt;
</div>

 

Currently it happens with only one admin. 
We tested with them multiple times, always the same result.

Do you know why this may happen?

  • jeffshurtliff's avatar
    jeffshurtliff
    4 years ago

    Yulia-Anaplan Oh I see, thanks for the clarification.

    In that case, I would recommend wrapping the text in the noautoesc directive as shown below and see if that does the trick.

    <#noautoesc><@component id="component-id" param="1" /></#noautoesc>

    Hope this helps!

  • Looking at the Using macros in custom content article, it doesn't look like you're able to use the component directive within custom content and can only import/include macro files and leverage those functions.

    So that would explain why the greater-than and less-than characters are being converted to HTML entities, since the custom content cannot interpret the directive as FreeMarker.

    • Yulia-Anaplan's avatar
      Yulia-Anaplan
      Guide

      Hi jeffshurtliff ,
      Thank you for your reply, I appreciate a lot.
      We don't use macro files in this component or the custom content.
      This component is just displaying some frontend stuff.
      So, HTML/CSS is in the component, and within the custom component we just call this component like that: <@component id="component-id" param="1" />
      It breaks only for one admin. As soon as they just open the custom content, it automatically format "<" and "/>" into "&lt;" and "/&gt;"
      Every time they need to manually delete "&lt;" and "/&gt;" and save before passing a new param value.

      • jeffshurtliff's avatar
        jeffshurtliff
        Boss

        Yulia-Anaplan Oh I see, thanks for the clarification.

        In that case, I would recommend wrapping the text in the noautoesc directive as shown below and see if that does the trick.

        <#noautoesc><@component id="component-id" param="1" /></#noautoesc>

        Hope this helps!