Merge branch 'master' of github.com:designcreateplay/NodeBB

v1.18.x
Julian Lam 12 years ago
commit 87baaacb8c

@ -138,7 +138,7 @@ var RDB = require('./redis.js'),
});
}
PostTools.markdownToHTML = function(md) {
PostTools.markdownToHTML = function(md, isSignature) {
var marked = require('marked'),
cheerio = require('cheerio');
@ -156,7 +156,7 @@ var RDB = require('./redis.js'),
if (href && !href.match(domain)) {
this.attr('href', domain + 'outgoing?' + href);
this.append(' <i class="icon-external-link"></i>');
if (!isSignature) this.append(' <i class="icon-external-link"></i>');
}
});

@ -38,7 +38,7 @@ var RDB = require('./redis.js'),
post.user_rep = userData.reputation || 0;
post.user_postcount = userData.postcount || 0;
post.picture = userData.picture || require('gravatar').url('', {}, https=global.nconf.get('https'));
post.signature = postTools.markdownToHTML(userData.signature);
post.signature = postTools.markdownToHTML(userData.signature, true);
if(post.editor !== '') {
user.getUserFields(post.editor, ['username', 'userslug'], function(editorData) {

@ -230,7 +230,7 @@ var user = require('./../user.js'),
userData.posts = posts.filter(function(p) {return p.deleted !== "1";});
userData.isFollowing = isFollowing;
userData.signature = postTools.markdownToHTML(userData.signature);
userData.signature = postTools.markdownToHTML(userData.signature, true);
res.json(userData);
});
});

Loading…
Cancel
Save