Node.js based forum software built for the modern web
merged conflicts. also fixed a potential issue where the external link icon would show up on internal links
psychobunny240683ed24ce
diff --cc src/postTools.jsindex 2850b666bf,4a00f897b6..940c39d256--- a/src/postTools.js+++ b/src/postTools.js@@@ -147,20 -147,14 +147,24 @@@ var RDB = require('./redis.js')});if (md.length > 0) {- var parsedContentDOM = cheerio.load(marked(md)),- anchorText = parsedContentDOM.text();+ var parsedContentDOM = cheerio.load(marked(md));- parsedContentDOM('a').attr('rel', 'nofollow');-- var href = parsedContentDOM('a').attr('href'),- domain = global.nconf.get('url');++ var domain = global.nconf.get('url');+++ parsedContentDOM('a').each(function() {- this.attr('rel', 'nofollow').attr('target', '_blank');- this.append(' <i class="icon-external-link"></i>');++ this.attr('rel', 'nofollow');++ var href = this.attr('href');+- if (href && !href.match(domain)) {- parsedContentDOM('a').attr('href', domain + 'outgoing?' + href);- }++ if (href && !href.match(domain)) {++ this.attr('href', domain + 'outgoing?' + href);++ this.append(' <i class="icon-external-link"></i>');++ }+ });+++html = parsedContentDOM.html();- } else html = '<p></p>';+ } else {+ html = '<p></p>';+ }return html;}