File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 362
362
<xs : attribute name =" castleConfiguration" type =" xs:string" use =" optional" />
363
363
<xs : attribute name =" multipleSitesConfiguration" type =" xs:string" use =" optional" />
364
364
<xs : attribute name =" dynamicDiscovery" type =" xs:boolean" use =" optional" />
365
+ <xs : attribute name =" defaultHtmlEscape" type =" xs:boolean" use =" optional" />
365
366
<xs : attribute name =" castleSection" type =" xs:string" use =" optional" />
366
367
<xs : attribute name =" engineType" type =" xs:string" use =" optional" />
367
368
<xs : attribute name =" containerType" type =" xs:string" use =" optional" />
Original file line number Diff line number Diff line change @@ -46,6 +46,17 @@ public bool DynamicDiscovery
46
46
set { base [ "dynamicDiscovery" ] = value ; }
47
47
}
48
48
49
+ /// <summary>
50
+ /// Default to escape HTML in titles and other single-entry fields.
51
+ /// </summary>
52
+ [ ConfigurationProperty ( "defaultHtmlEscape" , DefaultValue = false ) ]
53
+ public bool DefaultHtmlEscape
54
+ {
55
+ get { return ( bool ) base [ "defaultHtmlEscape" ] ; }
56
+ set { base [ "defaultHtmlEscape" ] = value ; }
57
+ }
58
+
59
+
49
60
/// <summary>Additional assemblies assemblies investigated while investigating the environemnt, e.g. to find item definitions.</summary>
50
61
[ ConfigurationProperty ( "assemblies" ) ]
51
62
public AssemblyCollection Assemblies
Original file line number Diff line number Diff line change 2
2
using System . Web ;
3
3
using System . Web . UI ;
4
4
using System . Web . UI . WebControls ;
5
+ using N2 . Configuration ;
5
6
using N2 . Web . UI . WebControls ;
6
7
7
8
namespace N2 . Details
@@ -34,7 +35,7 @@ public WithEditableTitleAttribute()
34
35
public WithEditableTitleAttribute ( string title , int sortOrder )
35
36
: base ( title , "Title" , sortOrder )
36
37
{
37
- AllowHtml = true ; // TODO: Load default value from web.config
38
+ AllowHtml = N2 . Context . Current . Resolve < EngineSection > ( ) . DefaultHtmlEscape ;
38
39
Required = true ;
39
40
}
40
41
You can’t perform that action at this time.
0 commit comments