fix(subParsers/images.js): fix empty title attribute in img tags

This big was introduced on purpose to mimic markdown.pl. Since we no longer match our development with that library,
it makes no sense to keep it.
This commit is contained in:
Estevao Soares dos Santos 2015-06-08 03:57:18 +01:00
parent 3a71b66d24
commit e27e16bdc5
5 changed files with 5 additions and 8 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -39,14 +39,11 @@ showdown.subParser('images', function (text, options, globals) {
url = showdown.helper.escapeCharacters(url, '*_', false); url = showdown.helper.escapeCharacters(url, '*_', false);
var result = '<img src="' + url + '" alt="' + altText + '"'; var result = '<img src="' + url + '" alt="' + altText + '"';
// attacklab: Markdown.pl adds empty title attributes to images. if (title != "") {
// Replicate this bug. title = title.replace(/"/g, '&quot;');
title = showdown.helper.escapeCharacters(title, '*_', false);
//if (title != "") { result += ' title="' + title + '"';
title = title.replace(/"/g, '&quot;'); }
title = showdown.helper.escapeCharacters(title, '*_', false);
result += ' title="' + title + '"';
//}
result += ' />'; result += ' />';