Merge pull request #5834 from leigh-pointer/baseNull

Update ReplaceTokens on ModuleBase
This commit is contained in:
Shaun Walker
2025-11-24 10:18:59 -05:00
committed by GitHub

View File

@ -460,6 +460,11 @@ namespace Oqtane.Modules
public string ReplaceTokens(string content, object obj)
{
// check for null or empty content
if (string.IsNullOrEmpty(content))
{
return content;
}
// Using StringBuilder avoids the performance penalty of repeated string allocations
// that occur with string.Replace or string concatenation inside loops.
var sb = new StringBuilder();