Expand my Community achievements bar.

Richtext - Html Problems

Avatar

Level 4

Good morning,
in a Cms dialog I have a component of type "cq/gui/components/authoring/dialog/richtext" where I also set disableXSSFiltering="{Boolean}true".
When I insert the html code through the "Source Edit" sometimes the component does not save the html code even if it is sent to the server.
How can I solve the problem?
Thank you

9 Replies

Avatar

Level 3

Hi @robertol6836527 !

Any example HTML code that is not getting saved.

 

Regards,

Shailesh

Avatar

Community Advisor

can you check the network call?

There is a call to default post servlet which save those values, you will see the 200 or 500 status code. check error later.



Arun Patidar

Avatar

Level 4

The server response is always 200 even when you don't save the data.

Avatar

Community Advisor

Could you please share the sample HTML? and what AEM version are you using?



Arun Patidar

Avatar

Level 4

Hi,

this is the html code that randomly doesn't save:
<div> <div class="ta-function ta-function--with-tag ta-function--tag-bottom ta-function--noicon"> <span class="ta-function__text">UNTIL THE 26/08 .....</span><div class="ta-tag ta-tag">
<span>TEXT TEXT ....</span></div></div></div>

Avatar

Community Advisor

Hi @robertol6836527, I checked using AEM V6.5.16 and Text (v2) Core Component and It is working fine for me. You can check Text (v2) Core Component for Rich-Text implementation. 

Do you use Text (v2) Core Component or Build from Scratch?

Avatar

Level 4

HI,
I have Aem 6.4.x and I use the "cq/gui/components/authoring/dialog/richtext" inside a custom dialog.

Thank you

Avatar

Community Advisor

I am able to save that text in AEM

arunpatidar_0-1690205652082.png

 

Is your AEM behind CDN, where security rules are written to remove some HTML?



Arun Patidar

Avatar

Level 4

To solve the problem it was necessary to remove the 'useSemanticMarkup' configuration