Skip to content

Commit

Permalink
feat(textAngularSetup): Added a taOptions:forceTextAngularSanitize to…
Browse files Browse the repository at this point in the history
… verify sanitizer provider.
  • Loading branch information
JoelParke committed Jul 10, 2015
1 parent 945cfa0 commit 8e642c1
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 6 deletions.
5 changes: 4 additions & 1 deletion dist/textAngular-sanitize.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ var $sanitizeMinErr = angular.$$minErr('$sanitize');
function $SanitizeProvider() {
this.$get = ['$$sanitizeUri', function($$sanitizeUri) {
return function(html) {
if (typeof arguments[1] != 'undefined') {
arguments[1].version = 'taSanitize';
}
var buf = [];
htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {
return !/^unsafe/.test($$sanitizeUri(uri, isImage));
Expand Down Expand Up @@ -178,7 +181,7 @@ var START_TAG_REGEXP =

// Safe Void Elements - HTML5
// http://dev.w3.org/html5/spec/Overview.html#void-elements
var voidElements = makeMap("area,br,col,hr,img,wbr");
var voidElements = makeMap("area,br,col,hr,img,wbr,input");

// Elements that you can, intentionally, leave open (and which close themselves)
// http://dev.w3.org/html5/spec/Overview.html#optional-tags
Expand Down
2 changes: 1 addition & 1 deletion dist/textAngular-sanitize.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8e642c1

Please sign in to comment.