summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/utils.js')
-rw-r--r--lib/handlebars/utils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/handlebars/utils.js b/lib/handlebars/utils.js
index d14795c..26d2b54 100644
--- a/lib/handlebars/utils.js
+++ b/lib/handlebars/utils.js
@@ -19,7 +19,7 @@ export function SafeString(string) {
};
SafeString.prototype.toString = function() {
- return this.string.toString();
+ return "" + this.string;
};
var escape = {
@@ -57,7 +57,7 @@ export function escapeExpression(string) {
// Force a string conversion as this will be done by the append regardless and
// the regex test will do this transparently behind the scenes, causing issues if
// an object's to string has escaped characters in it.
- string = string.toString();
+ string = "" + string;
if(!possible.test(string)) { return string; }
return string.replace(badChars, escapeChar);