Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!

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

Avatar

Level 5

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

1 Reply

Avatar

Community Advisor

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