mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	removed external link icon from signatures only
This commit is contained in:
		| @@ -138,7 +138,7 @@ var	RDB = require('./redis.js'), | |||||||
| 		}); | 		}); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	PostTools.markdownToHTML = function(md) { | 	PostTools.markdownToHTML = function(md, isSignature) { | ||||||
| 		var	marked = require('marked'), | 		var	marked = require('marked'), | ||||||
| 			cheerio = require('cheerio'); | 			cheerio = require('cheerio'); | ||||||
|  |  | ||||||
| @@ -156,7 +156,7 @@ var	RDB = require('./redis.js'), | |||||||
|  |  | ||||||
| 				if (href && !href.match(domain)) { | 				if (href && !href.match(domain)) { | ||||||
| 					this.attr('href', domain + 'outgoing?' + href); | 					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_rep = userData.reputation || 0; | ||||||
| 			post.user_postcount = userData.postcount || 0; | 			post.user_postcount = userData.postcount || 0; | ||||||
| 			post.picture = userData.picture || require('gravatar').url('', {}, https=global.nconf.get('https')); | 			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 !== '') { | 			if(post.editor !== '') { | ||||||
| 				user.getUserFields(post.editor, ['username', 'userslug'], function(editorData) { | 				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.posts = posts.filter(function(p) {return p.deleted !== "1";}); | ||||||
| 								userData.isFollowing = isFollowing; | 								userData.isFollowing = isFollowing; | ||||||
| 								userData.signature = postTools.markdownToHTML(userData.signature); | 								userData.signature = postTools.markdownToHTML(userData.signature, true); | ||||||
| 								res.json(userData); | 								res.json(userData); | ||||||
| 							}); | 							}); | ||||||
| 						}); | 						}); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user