final PrintWriter printWriter = new PrintWriter(result);
ore.printStackTrace(printWriter);
}
private String getCleanHTML(String original) {
Policy policy = null;
try {
String fPath = VFSManager.sanitizePath(this.getClass().getPackage().getName());
fPath = fPath.replace('.', '/');
fPath = fPath + "/_resources/" + POLICY_FILE;
InputStream inStream = this.getClass().getResourceAsStream(fPath);
policy = Policy.getInstance(inStream);
if(maxLength > 0) {
policy.setDirective("maxInputSize", Integer.toString(maxLength));
}
} catch (PolicyException e) {
if (jUnitDebug) System.err.println("Policy file not found/readable/valid!");
printOriginStackTrace();
throw new AssertException("Owasp AntiSamy XSS Filter missing a correct policy file.");