The autoescape mechanism protects web applications from the most common cross-site scripting (XSS) vulnerabilities. To secure your application, enable autoescaping.
1def nonCompliant(pageParameters: PageParameters): Unit = {
2 // Noncompliant: Autoescape is disabled for this label.
3 add(new Label("test").setEscapeModelStrings(false))
4}
1def compliant(pageParameters: PageParameters): Unit = {
2 // Compliant: Autoescape is enabled for this label.
3 add(new Label("test").setEscapeModelStrings(true))
4}