aboutsummaryrefslogtreecommitdiff
path: root/js/lib/html-renderer.js
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-11-10 10:52:11 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-11-10 10:52:11 -0800
commit4d4a3f72892ee50207e50e447a03f61e5c267867 (patch)
treefe88eabc8be7648cdb9f10709393417bd7335b33 /js/lib/html-renderer.js
parent65af8da7a80a9fb062cacf1ef7e21b0c91cfde53 (diff)
Allow images to contain images.
Diffstat (limited to 'js/lib/html-renderer.js')
-rw-r--r--js/lib/html-renderer.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/lib/html-renderer.js b/js/lib/html-renderer.js
index a676e3a..6eb96bc 100644
--- a/js/lib/html-renderer.js
+++ b/js/lib/html-renderer.js
@@ -43,7 +43,9 @@ var renderInline = function(inline) {
return inTags('a', attrs, this.renderInlines(inline.label));
case 'Image':
attrs = [['src', this.escape(inline.destination, true)],
- ['alt', this.renderInlines(inline.label).replace(/\<[^>]*\>/g,'')]];
+ ['alt', this.renderInlines(inline.label).
+ replace(/\<[^>]*alt="([^"]*)"[^>]*\>/g, '$1').
+ replace(/\<[^>]*\>/g,'')]];
if (inline.title) {
attrs.push(['title', this.escape(inline.title, true)]);
}