angular-sanitize

AngularJS module for sanitizing HTML

Latest Ver 1.8.3
Homepage
Github
0
58,740
📢 'angular-sanitize' is a module used in AngularJS applications to safely handle HTML content. It sanitizes input HTML to protect against XSS (Cross Site Scripting) attacks.
License: MIT
https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.8.3/angular-sanitize.js
https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.8.3/angular-sanitize.min.js
https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.8.3/angular-sanitize.min.js.map

Sample Code

⚠️ Some code, including import statements, may not run properly on jsFiddle. If it fails to execute, please copy the code and try it in your own environment.
📄 HTML
angular.module('myApp', ['ngSanitize']);
app.controller('DemoController', function($scope, $sce) {
  $scope.safeHtml = $sce.trustAsHtml('<p>This is <b>sanitized</b> HTML!</p>');
});

🧩 External JS
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.2/angular.min.js"></script>

⚡ Top Tools for Developers
Text Compare

Text Comparison

Easily spot the differences between two texts.

Favicon Generator

Favicon Generator

Quickly and easily generate favicons.

Lorem Ipsum Generator

Lorem Ipsum Generator

Generate placeholder text for your designs.

Character Counter

Character Counter

Check character and word count in real time.

SRT ↔ SMI

SRT ↔ SMI Converter

Easily convert between subtitle formats.

Text Extract(OCR)

Image Text Extractor

Automatically extract text from images.