We’ve developed a simple HtmlSantizer and opensourced it here: https://github.com/jitbit/HtmlSanitizer
Usage
var result = HtmlSanitizer.SanitizeHtml(input);
[Disclaimer! I’m one of the authors!]
More Related Contents:
- Sanitize/Rewrite HTML on the Client Side
- Is it possible to append to innerHTML without destroying descendants’ event listeners?
- What is the max size of localStorage values?
- How to detect if JavaScript is disabled?
- How to get the body’s content of an iframe in Javascript?
- How to get an HTML element’s style values in javascript?
- Detect all changes to a (immediately) using JQuery
- How to set an iframe src attribute from a variable in AngularJS
- When should I use Inline vs. External Javascript?
- Using HTML5/JavaScript to generate and save a file
- Disable form auto submit on button click
- Input placeholders for Internet Explorer
- Resize event for textarea?
- Why should y.innerHTML = x.innerHTML; be avoided?
- How can you figure out the highest z-index in your document?
- Scroll with anchor without # in URL
- jQuery: how to change tag name?
- tag vs tag
- HTML/JavaScript: Simple form validation on submit
- Show a second dropdown based on previous dropdown selection
- Open a new tab with javascript but stay on current tab
- Why aren’t Safari or Firefox able to process audio data from MediaElementSource?
- Is it possible to use HTML’s .querySelector() to select by xlink attribute in an SVG?
- WebRTC video is not displaying
- hide open/active accordion when another accordion is clicked
- javascript function name cannot set as click?
- copying the value of a form’s file input field to another form’s input field
- How can I fix Highcharts error #13?
- How to delete an HTML element inside a div with attribute contentEditable?
- Bootstrap Dropdown menu is not working