Contextual output encoding for Java 8+ to help prevent XSS. Version 1.6.0 provides a zero-dependency core, String and Writer APIs, and optional javax/Jakarta JSP adapters.
Historical note: this tab describes an obsolete unpatched Internet Explorer innerHTML round-trip issue. It is retained for context, not current usage guidance. The original material is archived in docs/archive/wiki-2019 in the repository. Use supported browsers and the current context guide.
The historical issue concerned Internet Explorer treating the grave accent (backtick, U+0060) as an HTML attribute delimiter during particular innerHTML round trips. It is distinct from JavaScript template-literal injection and the template-literal support introduced in Java Encoder 1.5.0.
The original wiki documented a nonstandard legacy browser parsing behavior. Historical demonstrations and attribution are preserved in the repository archive. They are not compatibility guarantees for current Java Encoder releases.
Reading markup through innerHTML and parsing the resulting string again could change how the affected Internet Explorer versions interpreted attributes. Output encoding cannot repair every unsafe DOM transformation. Avoid transferring untrusted text through HTML-parsing APIs.
Use supported browsers and textContent or other safe text APIs for untrusted text. When user-authored HTML is required, use a policy-based HTML sanitizer. Do not adopt the archived grave-accent replacement workaround as current library guidance.
Project Leader
Jeremy Long co-leads OWASP Java Encoder and coordinates project maintenance, releases, and security response with Jim Manico.
Project Leader
Jim Manico is the founder of Manicode Security, where he trains developers and organizations in secure coding. He is an OWASP Distinguished Lifetime Member, a Java Champion, and the author of Iron-Clad Java. He leads the OWASP AISVS, Cheat Sheet Series, Java HTML Sanitizer, and Java Encoder projects.
Recognizing key contributors who have made significant impact on this project.
Original Author
Original author of OWASP Java Encoder.