0

I have a question about angular-sanitize($sanitize)[1]. Why doesn't it allow input and button elements?

Example code:

$sanitize('<input/>') // ""
$sanitize('<button>A</button>') // ""

I have looked at the code and saw that there are hard-coded valid elements [2]. My question more about "Why they treat them as harmful elements"

Thanks!

[1] - https://github.com/angular/angular.js/blob/0822d34b10ea0371c260c80a1486a4d508ea5a91/src/ngSanitize/sanitize.js#L1 [2] - https://github.com/angular/angular.js/blob/0822d34b10ea0371c260c80a1486a4d508ea5a91/src/ngSanitize/sanitize.js#L265-L269

maksimr
  • 4,891
  • 2
  • 23
  • 22

1 Answers1

0

Ok, looks like I have found the partial answer to my question - https://github.com/angular/angular.js/issues/5900

maksimr
  • 4,891
  • 2
  • 23
  • 22