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

Commit 02ce357

Browse files
rjametNarretz
authored andcommitted
fix($compile): Bump track src from URL to RESOURCE_URL.
Track files might contain CSS, and haven't been around for long. Keeping the high security context as a precaution is justified.
1 parent ec31b3d commit 02ce357

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ng/compile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3152,9 +3152,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
31523152
}
31533153
var tag = nodeName_(node);
31543154
// All tags with src attributes require a RESOURCE_URL value, except for
3155-
// img and various html5 media tags.
3155+
// img and various html5 media tags. Note that track src allows files
3156+
// containing CSS, so leave that to RESOURCE_URL level.
31563157
if (attrNormalizedName === 'src' || attrNormalizedName === 'ngSrc') {
3157-
if (['img', 'video', 'audio', 'track'].indexOf(tag) === -1) {
3158+
if (['img', 'video', 'audio'].indexOf(tag) === -1) {
31583159
return $sce.RESOURCE_URL;
31593160
}
31603161
// maction[xlink:href] can source SVG. It's not limited to <maction>.

0 commit comments

Comments
 (0)