re: issue #104, added external link icon to external links

v1.18.x
Julian Lam 12 years ago
parent d9fa78a866
commit 712eec0872

@ -389,7 +389,7 @@ body .navbar .nodebb-inline-block {
.post-signature {
color: #666;
font-size: 12px;
font-size: 12.5px;
border-top: 1px solid #ddd;
display: inline-block;

@ -147,8 +147,12 @@ var RDB = require('./redis.js'),
});
if (md.length > 0) {
var parsedContentDOM = cheerio.load(marked(md));
parsedContentDOM('a').attr('rel', 'nofollow').attr('target', '_blank');
var parsedContentDOM = cheerio.load(marked(md)),
anchorText = parsedContentDOM.text();
parsedContentDOM('a').each(function() {
this.attr('rel', 'nofollow').attr('target', '_blank');
this.append(' <i class="icon-external-link"></i>');
});
html = parsedContentDOM.html();
} else html = '<p></p>';

Loading…
Cancel
Save