Index: src/site/xdoc/manual/layouts.xml.vm =================================================================== --- src/site/xdoc/manual/layouts.xml.vm (revision 1577410) +++ src/site/xdoc/manual/layouts.xml.vm (working copy) @@ -393,6 +393,41 @@
+ Encodes special characters such as '\n' and HTML characters to help prevent log forging + and some XSS attacks that could occur when displaying logs in a web browser. Anytime + user provided data is logged, this can provide a safeguard. +
++ A typical usage would encode the message +
%enc{%m}
+ but user input could come from other locations as well, such as the MDC
+ %enc{%mdc{key}}
+
+ The replaced characters are: +
| Character | +Replacement | +
|---|---|
| '\r', '\n' | +Removed from the pattern | +
| &, <, >, ", ', / | +Replaced with the corresponding HTML entity | +