aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-26 22:10:27 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-26 22:10:27 -1000
commit6c20007fa0ba140838c722bb7b06107d20902e51 (patch)
tree1a18188e64237ad62d8ee45f2e1eb34183de1daf /lib
parent544a8927a47bc0e4cc2f925b0dd248668701c906 (diff)
downloadpatchfoo-6c20007fa0ba140838c722bb7b06107d20902e51.tar.gz
patchfoo-6c20007fa0ba140838c722bb7b06107d20902e51.zip
Fix double-HTML-encoded image titles
Diffstat (limited to 'lib')
-rw-r--r--lib/render.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/render.js b/lib/render.js
index deaf061..aade2f2 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -31,16 +31,16 @@ MdRenderer.prototype.image = function (ref, title, text) {
controls: 'controls',
src: this.render.toUrl(ref),
alt: alt,
- title: title || undefined
+ title: u.unescapeHTML(title) || undefined
}) : /^audio:/.test(text) ? h('audio', {
controls: 'controls',
src: this.render.toUrl(ref),
alt: alt,
- title: title || undefined
+ title: u.unescapeHTML(title) || undefined
}) : h('img', {
src: this.render.imageUrl(ref),
alt: alt,
- title: title || undefined
+ title: u.unescapeHTML(title) || undefined
})).outerHTML
}