MCPcopy Create free account
hub / github.com/angular-ui/ui-router / getTrustedContext

Function getTrustedContext

test/angular/1.2/angular.js:7053–7067  ·  view source on GitHub ↗
(node, attrNormalizedName)

Source from the content-addressed store, hash-verified

7051
7052
7053 function getTrustedContext(node, attrNormalizedName) {
7054 if (attrNormalizedName == "srcdoc") {
7055 return $sce.HTML;
7056 }
7057 var tag = nodeName_(node);
7058 // maction[xlink:href] can source SVG. It's not limited to <maction>.
7059 if (attrNormalizedName == "xlinkHref" ||
7060 (tag == "FORM" && attrNormalizedName == "action") ||
7061 // links can be stylesheets or imports, which can run script in the current origin
7062 (tag == "LINK" && attrNormalizedName == "href") ||
7063 (tag != "IMG" && (attrNormalizedName == "src" ||
7064 attrNormalizedName == "ngSrc"))) {
7065 return $sce.RESOURCE_URL;
7066 }
7067 }
7068
7069
7070 function addAttrInterpolateDirective(node, directives, value, name) {

Callers 1

Calls 1

nodeName_Function · 0.50

Tested by

no test coverage detected