RecommendedXSSWhiteList.js 483 B

1234567891011121314151617
  1. /**
  2. * reference: https://meta.stackexchange.com/questions/1777/what-html-tags-are-allowed-on-stack-exchange-sites
  3. * plus h4, h5, h6
  4. */
  5. const tags = [
  6. 'a', 'b', 'blockquote', 'blockquote', 'code', 'del', 'dd', 'dl', 'dt', 'em',
  7. 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'i', 'img', 'kbd', 'li', 'ol', 'p', 'pre',
  8. 's', 'sup', 'sub', 'strong', 'strike', 'ul', 'br', 'hr',
  9. ];
  10. const attrs = ['src', 'width', 'height', 'alt', 'title', 'href'];
  11. module.exports = {
  12. tags,
  13. attrs,
  14. };