Not able to use the section tag in RTE Field using the source edit option | Community
Skip to main content
Nandheswara
Level 4
February 21, 2025
Solved

Not able to use the section tag in RTE Field using the source edit option

  • February 21, 2025
  • 1 reply
  • 376 views

Hi All,

I'm facing the issue when i try to add some custom class and section tag by using the source edit option , I am trying to edit the HTML in the RTE Field and Modify the tags and adding the section tag. once i close the source edit option and then reopen the dialog, section tag is getting vanished what is the problem in that how i can resolve this one.


Before Saving the HTML in Source Edit

<section class="class-test-one"> <div class="class-test-two"> <h1 class="fs-24">Test</h1> </div> </section>

 

After Saved and reopened the dialog

<div class="class-test-two"> <h1 class="fs-24">Test</h1> </div>

 

Regards
Nandheswara

Best answer by narendragandhi

Hi @nandheswara 

 

That is the expected behavior. It's being done by the XSSProtection configuration. You can check the list of allowed tags here - http://localhost:4502/crx/de/index.jsp#/libs/cq/xssprotection/config.xml

 

You would need to overlay this file under /apps/cq/xssprotection and include section tag to the list. You can refer this article for detailed instructions - https://medium.com/@bhargava.shalki/custom-html-tags-in-aem-94a5ec166d96

 

Hope this helps!

 

Thanks

Narendra

1 reply

narendragandhi
Community Advisor
narendragandhiCommunity AdvisorAccepted solution
Community Advisor
February 21, 2025

Hi @nandheswara 

 

That is the expected behavior. It's being done by the XSSProtection configuration. You can check the list of allowed tags here - http://localhost:4502/crx/de/index.jsp#/libs/cq/xssprotection/config.xml

 

You would need to overlay this file under /apps/cq/xssprotection and include section tag to the list. You can refer this article for detailed instructions - https://medium.com/@bhargava.shalki/custom-html-tags-in-aem-94a5ec166d96

 

Hope this helps!

 

Thanks

Narendra