Expand my Community achievements bar.

SOLVED

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 Accepted Solution

Avatar

Correct answer by
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

View solution in original post

1 Reply

Avatar

Correct answer by
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