Skip to content
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
@eXon

Description

@eXon

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions