Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5115275

Browse files
rjametNarretz
authored andcommitted
feat($compile): Reduce source src from RESOURCE_URL to URL context.
Source src is only for media files (videos, audio, images), and present no known script execution possibilities. We also don't expect new ones to pop up, as this tags is only supported on recent browsers.
1 parent 02ce357 commit 5115275

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3155,7 +3155,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
31553155
// img and various html5 media tags. Note that track src allows files
31563156
// containing CSS, so leave that to RESOURCE_URL level.
31573157
if (attrNormalizedName === 'src' || attrNormalizedName === 'ngSrc') {
3158-
if (['img', 'video', 'audio'].indexOf(tag) === -1) {
3158+
if (['img', 'video', 'audio', 'source'].indexOf(tag) === -1) {
31593159
return $sce.RESOURCE_URL;
31603160
}
31613161
// maction[xlink:href] can source SVG. It's not limited to <maction>.

0 commit comments

Comments
 (0)