You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,13 @@ key name before being inserted into AppSettings. `stripPrefix` is a boolean valu
69
69
This setting is a boolean that specified whether to avoid throwing exceptions when the backing configuration source cannot be found or connected.
70
70
The default default value is `true`, though some config builders (such as the Azure-based builders) will use a different default.
71
71
72
+
#### escapeExpandedValues
73
+
.Net configuration is XML-based in it's raw form. While these config builders work on `ConfigurationSection` objects in `Strict` and `Greedy` modes,
74
+
when operating in `Expand` mode, tokens in the raw XML input are directly replaced with values. Applications that use `Expand` mode may do so because
75
+
they need to inject additional XML rather than just a string value. But for the cases when a simple string replacement is the goal, unescaped XML
76
+
characters in replacement values may result in invalid XML. In these cases, simply set the `escapeExpandedValues` attribute to `true` and the
77
+
config builder will escape special XML characters before replacing tokens in `Expand` mode. The default value is `false`.
78
+
72
79
#### tokenPattern
73
80
This is a setting that is shared between all KeyValueConfigBuilder-derived builders is `tokenPattern`. When describing the `Expand` behavior of these builders
74
81
above, it was mentioned that the raw xml is searched for tokens that look like __`${token}`__. This is done with a regular expression. `@"\$\{(\w+)\}"` to be exact.
<!-- key="Secret3" value="Will be added by KV3:Latest3. IFF already added, will be "updated" by KV1 to Latest3. KV2 and KV4 don't have versions matching this secret." -->
0 commit comments