Adding null check to Tokenizer

--HG--
branch : 1.x
This commit is contained in:
Zoltán Lehóczky
2013-05-10 23:43:01 +02:00
parent ae167b35f8
commit df168d285e

View File

@@ -41,7 +41,8 @@ namespace Orchard.Tokens.Implementation {
}
public string Replace(string text, IDictionary<string, object> data, ReplaceOptions options) {
if (string.IsNullOrEmpty(text)) return string.Empty;
// do we have to replace tokens with hashes ?
bool hashMode = text.Contains("#{");