(node, attrNormalizedName)
| 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) { |
no test coverage detected