aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-08-18 15:06:29 -0700
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-08-21 15:43:12 -0700
commite4bf56829d8e46d3f962f5915eaf310d8a67f4fa (patch)
treeb5fd2b53173b92733d4d9e32a6c758e33a0e5678 /lib
parent6cd159533454398fe95b313e6cec9fd8f5db2273 (diff)
downloadpatchfoo-e4bf56829d8e46d3f962f5915eaf310d8a67f4fa.tar.gz
patchfoo-e4bf56829d8e46d3f962f5915eaf310d8a67f4fa.zip
Render non-blob image markdown as link
for compatibility with Patchwork (re: %XhyQZvVmfFVMjwYyoX13VZFBkzWJ63o6w9YSIjMWI88=.sha256) and to prevent remote audio/video embed
Diffstat (limited to 'lib')
-rw-r--r--lib/render.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js
index 0a20b10..045cf86 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -25,6 +25,7 @@ MdRenderer.prototype.urltransform = function (href) {
}
MdRenderer.prototype.image = function (ref, title, text) {
+ if (ref[0] !== '&') return this.link(ref, title, text)
var alt = this.render.getImageAlt(ref, text)
return (/^video:/.test(text) ? h('video', {
controls: 'controls',