angular-sanitize
is published as a separate NPM package with package binaries compiled from source code in main angular.js repo.
We use a forked version of angular.js (please see the details of the fork in README.md file).
We have made some security fixes in the forked angular.js which include patching src/ng/sanitizeUri.js
file and the compiled angular-sanitize.js
, angular-sanitize.min.js
and angular-sanitize.min.js.map
are then copied to this repo and published from here.
- Go to forked angular.js and follow the instructions there to build angular.js.
- Copy
angular-sanitize.js
,angular-sanitize.min.js
andangular-sanitize.min.js.map
from the build directory to this repo. - Update versions in
bower.json
andpackage.json
.
This repo is for distribution on npm
and bower
. The source for this module is in the
main AngularJS repo.
Please file issues and pull requests against that repo.
You can install this package either with npm
or with bower
.
npm install angular-sanitize
Then add ngSanitize
as a dependency for your app:
angular.module('myApp', [require('angular-sanitize')]);
bower install angular-sanitize
Add a <script>
to your index.html
:
<script src="/bower_components/angular-sanitize/angular-sanitize.js"></script>
Then add ngSanitize
as a dependency for your app:
angular.module('myApp', ['ngSanitize']);
Documentation is available on the AngularJS docs site.
The MIT License
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.