Is this new? Because when I use the new 2.4.0 for this unit test: ``` handlebars {{[String.Append] \"foo\" ([String.Append] \"a\" \"b\")}} ``` When parsing the arguments, I get a SafeString with value `ab`, however the SafeString is internal, so I cannot process it. My Append method is like: ``` c# [HandlebarsWriter(WriterType.String)] public string Append(string value, string append) { if (string.IsNullOrEmpty(value)) { return append; } if (string.IsNullOrEmpty(append)) { return value; } return value + append; } ```
Activity
StefH commentedon Aug 6, 2026
I think I found it.
I always used
WriteSafeStringand the behavior has been changed.So probably I can just use
Write.StefH commentedon Aug 6, 2026
Nope...
Does not matter, my code still fails.
StefH commentedon Aug 6, 2026
Solution for me is:
rexm commentedon Aug 7, 2026
Thanks for flagging this. Fix in progress.
fix: stop leaking internal SafeString type through subexpression resu…
Merge pull request #664 from Handlebars-Net/fix/issue-660-safestring-…
rexm commentedon Aug 7, 2026
Released under 2.4.1