-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
ModuleConfig.cfc
55 lines (50 loc) · 1.61 KB
/
ModuleConfig.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* ********************************************************************************
* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
* www.ortussolutions.com
* *******************************************************************************
*/
component {
// Module Properties
this.title = "AntiSamy";
this.author = "Ortus Solutions, Corp";
this.webURL = "https://www.ortussolutions.com";
this.description = "Leverages the AntiSamy libraries for XSS cleanups";
this.version = "@build.version@[email protected]@";
// CF Mapping
this.cfmapping = "cbantisamy";
// Module Dependencies That Must Be Loaded First, use internal names or aliases
this.dependencies = [ "cbjavaloader" ];
// Helpers
this.applicationHelper = [ "helpers/mixins.cfm" ];
function configure(){
// Default settings
settings = {
// The library path
libPath : modulePath & "/models/lib",
// Activate auto request capture cleanups
autoClean : true,
// Default Policy to use, available are: antisamy, ebay, myspace, slashdot and tinymce
defaultPolicy : "ebay",
// Custom Policy absolute path, leave empty if not used
customPolicy : ""
};
// Custom Declared Interceptors
interceptors = [
{
class : "#this.cfmapping#.interceptors.AutoClean",
name : "AutoClean@CBAntiSamy"
}
];
}
/**
* Fired when the module is registered and activated.
*/
function onLoad(){
// Class load antisamy
controller
.getWireBox()
.getInstance( "loader@cbjavaloader" )
.appendPaths( settings.libPath );
}
}