I agree that it is desirable to remove the "escapeHtml" parameter. However, you can't simply escape everything. Consider a specification like this:
Actually, last time I tried that, it didn't work, but anyhow that's a separate issue. The point here is that the <b> in the format should not be escaped.
I think the following should work:
- do not escape any output that is explicitly provided by the user (Hudson admin). This means
BUILD_LOG_REGEX: substText
CHANGES: format, pathFormat (why doesn't this support changesFormat?)
CHANGES_SINCE_LAST_SUCCESS: format, changesFormat, pathFormat
CHANGES_SINCE_LAST_UNSTABLE: format, changesFormat, pathFormat
- escape everything else. This includes change text, failed test details, environment variables, build log, etc.
The Jelly templates for html are a little more tricky. Following the same rule, the template itself should not be escaped, but anything inserted into it should be. So, looking at the default Jelly template, when I see a line like this:
Clearly whatever ${changeSet.logs} gets expanded to needs to be escaped, but the <:j does not.
I hope that makes sense.
Another case where escaping is required: $FAILED_TESTS included a traceback containing this text:
at java.lang.System.loadLibrary(System.java:1028)
at org.nexusformat.NexusFile.<clinit>(NexusFile.java:99)
at gda.data.nexus.extractor.NexusExtractor.runLoop(NexusExtractor.java:408)
The <clinit> caused problems.