Просмотр исходного кода

add div and style to recommended

sou 7 лет назад
Родитель
Сommit
4aa7cd793a
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      lib/util/RecommendedXSSWhiteList.js

+ 4 - 4
lib/util/RecommendedXSSWhiteList.js

@@ -1,16 +1,16 @@
 /**
  * reference: https://meta.stackexchange.com/questions/1777/what-html-tags-are-allowed-on-stack-exchange-sites
- * added tags: h4, h5, h6
- * added attrs: class(without this, markdown for <code> does not work)
+ * added tags: h4, h5, h6, span, div
+ * added attrs: class, style
  */
 
 const tags = [
   'a', 'b', 'blockquote', 'blockquote', 'code', 'del', 'dd', 'dl', 'dt', 'em',
   'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'i', 'img', 'kbd', 'li', 'ol', 'p', 'pre',
-  's', 'sup', 'sub', 'strong', 'strike', 'ul', 'br', 'hr',
+  's', 'sup', 'sub', 'strong', 'strike', 'ul', 'br', 'hr', 'span', 'div',
 ];
 
-const attrs = ['src', 'width', 'height', 'alt', 'title', 'href', 'class'];
+const attrs = ['src', 'width', 'height', 'alt', 'title', 'href', 'class', 'style'];
 
 module.exports = {
   tags,