aboutsummaryrefslogtreecommitdiff
path: root/lib/render.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-12-14 09:16:31 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-12-14 09:16:31 -1000
commitde6d39cedeb4af0e54ca04583ad3fe33e2ef094a (patch)
treed28125d512c6fc331fa1fedc9efad0c5aecc9710 /lib/render.js
parent0bd830cf4ebf9cf3e4df1f2dba4b851b9361fc14 (diff)
downloadpatchfoo-de6d39cedeb4af0e54ca04583ad3fe33e2ef094a.tar.gz
patchfoo-de6d39cedeb4af0e54ca04583ad3fe33e2ef094a.zip
Sanitize strings
Calling String on an object with a toString property would throw an error
Diffstat (limited to 'lib/render.js')
-rw-r--r--lib/render.js2
1 files changed, 1 insertions, 1 deletions
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)