mirror of
https://github.com/hanzoai/handlebars.js.git
synced 2026-09-24 16:59:42 +00:00
* Fix noEscape numeric values being added instead of concatenated
In the inline output path, an unescaped mustache emitted the raw value
(`value != null ? value : ""`) rather than a string. When two such
appends were merged with ` + ` and both values were numbers, JavaScript
performed numeric addition: `{{a}}{{b}}` with noEscape and a=1, b=2
produced "3" instead of "12". The same affected triple-stash `{{{a}}}`.
Coerce non-null values to a String in the inline append, matching the
escaped path and the documented contract of `append` ("Coerces value to
a String").
* Potential fix for pull request finding
---------
Co-authored-by: Igor Savin <[email protected]>
Co-authored-by: Hanzo Dev <[email protected]>