From de6d39cedeb4af0e54ca04583ad3fe33e2ef094a Mon Sep 17 00:00:00 2001 From: cel Date: Sat, 14 Dec 2019 09:16:31 -1000 Subject: Sanitize strings Calling String on an object with a toString property would throw an error --- lib/render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/render.js') diff --git a/lib/render.js b/lib/render.js index 1aec728..e694396 100644 --- a/lib/render.js +++ b/lib/render.js @@ -190,7 +190,7 @@ Render.prototype.markdown = function (text, mentions, opts) { var out = ssbcMd ? md.block(String(text), { toUrl: function (ref) { return self.toUrl(ref) }, imageLink: function (ref) { return self.imageUrl(ref) } - }) : marked(String(text), this.markedOpts) + }) : marked(u.toString(text), this.markedOpts) delete this._mentions delete this._mentionsByLink return out //fixSymbols(out) -- cgit v1.2.3