mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
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:
parent
3a71b66d24
commit
e27e16bdc5
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -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, '"');
|
||||||
|
title = showdown.helper.escapeCharacters(title, '*_', false);
|
||||||
//if (title != "") {
|
result += ' title="' + title + '"';
|
||||||
title = title.replace(/"/g, '"');
|
}
|
||||||
title = showdown.helper.escapeCharacters(title, '*_', false);
|
|
||||||
result += ' title="' + title + '"';
|
|
||||||
//}
|
|
||||||
|
|
||||||
result += ' />';
|
result += ' />';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user