- Commit
- cdba827fbc2d6f9b8e4d496a2d65a8df276b1a18
- Parent
- ca8baa92556576731b59f793128d445dd7c76aa4
- Author
- John MacFarlane <fiddlosopher@gmail.com>
- Date
Updated js writer to render plain text for alt attributes of images.
My personal build of CMark ✏️
Updated js writer to render plain text for alt attributes of images.
1 file changed, 1 insertion, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/lib/html-renderer.js | 2 | 1 | 1 |
diff --git a/js/lib/html-renderer.js b/js/lib/html-renderer.js @@ -43,7 +43,7 @@ var renderInline = function(inline) { return inTags('a', attrs, this.renderInlines(inline.label)); case 'Image': attrs = [['src', this.escape(inline.destination, true)], - ['alt', this.escape(this.renderInlines(inline.label))]]; + ['alt', this.renderInlines(inline.label).replace(/\<[^>]*\>/g,'')]]; if (inline.title) { attrs.push(['title', this.escape(inline.title, true)]); }