mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	allow images in home and category
This commit is contained in:
		| @@ -175,6 +175,9 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { | ||||
| 			}); | ||||
|  | ||||
| 			translator.translate(html, function(translatedHTML) { | ||||
| 				translatedHTML = $(translatedHTML); | ||||
| 				translatedHTML.find('img').addClass('img-responsive'); | ||||
|  | ||||
| 				recentReplies.html(translatedHTML); | ||||
|  | ||||
| 				$('#category_recent_replies span.timeago').timeago(); | ||||
|   | ||||
| @@ -184,8 +184,20 @@ | ||||
| 				console.log(timestamp, e.stack); | ||||
| 			} | ||||
| 			return ''; | ||||
| 		} | ||||
| 		}, | ||||
|  | ||||
| 		tags : ['a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'map', 'mark', 'menu', 'meta', 'meter', 'nav', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr'], | ||||
|  | ||||
| 		getTagsExcept : function(excludeTags) { | ||||
| 			var tagsToReturn = utils.tags.slice(); | ||||
| 			excludeTags.forEach(function(tag) { | ||||
| 				var index = tagsToReturn.indexOf(tag); | ||||
| 				if(index !== -1) { | ||||
| 					tagsToReturn.splice(index, 1); | ||||
| 				} | ||||
| 			}); | ||||
| 			return tagsToReturn; | ||||
| 		} | ||||
| 	}; | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -298,7 +298,8 @@ var db = require('./database'), | ||||
| 							} | ||||
|  | ||||
| 							if(stripTags) { | ||||
| 								postData.content = S(content).stripTags().s; | ||||
| 								var s = S(content); | ||||
| 								postData.content = s.stripTags.apply(s, utils.getTagsExcept(['img', 'i'])).s; | ||||
| 							} else { | ||||
| 								postData.content = content; | ||||
| 							} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user