mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Merge pull request #6194 from jtkech/patch-6
[Fixes #6193] TokenFilters Cohabitation
This commit is contained in:
@@ -53,7 +53,9 @@ namespace Orchard.Tokens.Implementation {
|
||||
var replacements = Evaluate(options.Predicate == null ? tokens : tokens.Where(options.Predicate), data);
|
||||
|
||||
return replacements.Aggregate(tokenset.Item1,
|
||||
(current, replacement) => current.Replace((hashMode ? "#{" : "{") + replacement.Key + "}", (options.Encoding ?? ReplaceOptions.NoEncode)(replacement.Key, replacement.Value)));
|
||||
(current, replacement) => replacement.Value == null ?
|
||||
current : current.Replace((hashMode ? "#{" : "{") + replacement.Key + "}",
|
||||
(options.Encoding ?? ReplaceOptions.NoEncode)(replacement.Key, replacement.Value)));
|
||||
}
|
||||
|
||||
private static Tuple<string, IEnumerable<string>> Parse(string text, bool hashMode) {
|
||||
@@ -111,4 +113,4 @@ namespace Orchard.Tokens.Implementation {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user