mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-17 00:21:30 +02:00
re: issue #104, added external link icon to external links
This commit is contained in:
@@ -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>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user