This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ngSanitize remove valids SVG elements #9578
Closed
Description
ngSanitize does not support some very basics SVG elements.
An example of something not working with ng-bind-html:
ng-bind-html="data"
$scope.data = '<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />';
Their is many legits SVG elements that are not supported.
Their is an extensive list here: https://developer.mozilla.org/en-US/docs/Web/SVG/Element
I think ngSanitize should keep all of them. I can't think of any security reasons why we shouldn't.
The only though I have is wether we want to keep ngSanitize only for html5 or should we support more. SVG is being used a lot with angular now.