Bug 1233780 - Avoid CPOWs in GCLI security csp. r=jwalker
MozReview-Commit-ID: Gb6tuRL8Tcn
--- a/devtools/shared/gcli/commands/security.js
+++ b/devtools/shared/gcli/commands/security.js
@@ -138,35 +138,35 @@ exports.items = [
return outPolicies;
}
},
{
item: "converter",
from: "securityCSPInfo",
to: "view",
exec: function(cspInfo, context) {
- var uri = context.environment.document.documentURI;
+ var url = context.environment.target.url;
if (cspInfo.length == 0) {
return context.createView({
html:
"<table class='gcli-csp-detail' cellspacing='10' valign='top'>" +
" <tr>" +
" <td> <img src='chrome://browser/content/gcli_sec_bad.svg' width='20px' /> </td> " +
- " <td>" + NO_CSP_ON_PAGE_MSG + " <b>" + uri + "</b></td>" +
+ " <td>" + NO_CSP_ON_PAGE_MSG + " <b>" + url + "</b></td>" +
" </tr>" +
"</table>"});
}
return context.createView({
html:
"<table class='gcli-csp-detail' cellspacing='10' valign='top'>" +
// iterate all policies
" <tr foreach='csp in ${cspinfo}' >" +
- " <td> ${csp.header} <b>" + uri + "</b><br/><br/>" +
+ " <td> ${csp.header} <b>" + url + "</b><br/><br/>" +
" <table class='gcli-csp-dir-detail' valign='top'>" +
// >> iterate all directives
" <tr foreach='dir in ${csp.directives}' >" +
" <td valign='top'> ${dir.dirValue} </td>" +
" <td valign='top'>" +
" <table class='gcli-csp-src-detail' valign='top'>" +
// >> >> iterate all srs
" <tr foreach='src in ${dir.dirSrc}' >" +