Simple HTML sanitizer in Javascript

后端 未结 4 891
抹茶落季
抹茶落季 2020-12-05 04:24

I\'m looking for a simple HTML sanitizer written in JavaScript. It doesn\'t need to be 100% XSS secure.

I\'m implementing Markdown and the WMD Markdown editor (The S

4条回答
  •  温柔的废话
    2020-12-05 04:51

    You should have a look at the one recommended in this question Sanitize/Rewrite HTML on the Client Side

    And just to be sure that you don't need to do more about XSS, please review the answers to this one How to prevent Javascript injection attacks within user-generated HTML

提交回复
热议问题