Escape QDN vars and prefix with underscores.

This commit is contained in:
CalDescent
2023-03-03 11:57:07 +00:00
parent fa14568cb9
commit b17035c864
2 changed files with 12 additions and 8 deletions

View File

@@ -40,12 +40,12 @@ function handleResponse(event, response) {
}
function buildResourceUrl(service, name, identifier, path) {
if (qdnContext == "render") {
if (_qdnContext == "render") {
url = "/render/" + service + "/" + name;
if (path != null) url = url.concat((path.startsWith("/") ? "" : "/") + path);
if (identifier != null) url = url.concat("?identifier=" + identifier);
}
else if (qdnContext == "gateway") {
else if (_qdnContext == "gateway") {
url = "/" + service + "/" + name;
if (identifier != null) url = url.concat("/" + identifier);
if (path != null) url = url.concat((path.startsWith("/") ? "" : "/") + path);
@@ -329,10 +329,10 @@ else if (document.attachEvent) {
document.addEventListener('DOMContentLoaded', () => {
qortalRequest({
action: "QDN_RESOURCE_DISPLAYED",
service: qdnService,
name: qdnName,
identifier: qdnIdentifier,
path: qdnPath
service: _qdnService,
name: _qdnName,
identifier: _qdnIdentifier,
path: _qdnPath
});
});