|
|
@ -26,8 +26,9 @@ define('forum/topic/images', [], function () {
|
|
|
|
const srcExt = src.split('.').slice(1).pop();
|
|
|
|
const srcExt = src.split('.').slice(1).pop();
|
|
|
|
const altFilename = alt.split('/').pop();
|
|
|
|
const altFilename = alt.split('/').pop();
|
|
|
|
const altExt = altFilename.split('.').slice(1).pop();
|
|
|
|
const altExt = altFilename.split('.').slice(1).pop();
|
|
|
|
|
|
|
|
|
|
|
|
imageEl.wrap('<a href="' + src + '" ' +
|
|
|
|
imageEl.wrap('<a href="' + src + '" ' +
|
|
|
|
(!srcExt && altExt ? ' download="' + altFilename + '" ' : '') +
|
|
|
|
(!srcExt && altExt ? ' download="' + utils.escapeHTML(altFilename) + '" ' : '') +
|
|
|
|
' target="_blank" rel="noopener">');
|
|
|
|
' target="_blank" rel="noopener">');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|