getrailo/railo — pull request #48 by dev-21solutions (2012-08-27 18:26:02+00:00)
Title: added class CFMLWriterWhitespacePref to allow Preformatted text

this new class can work with any list of tags to preserve preformatted text.

the tags that should preserve preformatted text can be set in the static constructor at line 39. the default tags are: CODE, PRE, and TEXTAREA.

the static boolean flag (doChangeWsToSpace) can also be set there. when true (default), any WS that is not a NewLine character and is not suppressed will be converted to a regular space. this can help fight some XSS attacks that inject certain WS chars and makes it harder to detect substrings like <SCRIPT> etc.