Abstract
Goal
When adding Custom Tags via Sling Models or Use Pojos, without overlaying the Anti Samy rules and add the tags in /apps/cq/xssprotection/config.xml, you should see the following in error.log...
Solution
1) Create the Pojo /apps/eaem-anti-samy-model/components/basic-render-component/ExperienceAEMModel.java
package apps.eaem_anti_samy_model.components.basic_render_component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.PostConstruct;
public class ExperienceAEMModel {
private static final Logger log = LoggerFactory.getLogger(ExperienceAEMModel.class);
public String getHtml() {
return "" +
"CREF Board of Trustees" +
"
The CREF Board of Trustees consists of 10 people who oversee the management of CREF.
" +
"";
}
}
2) Create the component render script /apps/eaem-anti-samy-model/components/basic-render-component/basic-render-component.html
Experience AEM Basic Render Component
${eaemModel.html @ context='html'}
3) Overlay the AntiSamy config file /apps/cq/xssprotection/config.xml and add the following....
....
......
Read Full Blog
Q&A
Please use this thread to ask the related questions.
Kautuk Sahni