]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toasterui: use text() instead of html()
authorBelen Barros Pena <belen.barros.pena@intel.com>
Mon, 2 Feb 2015 17:40:21 +0000 (17:40 +0000)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 9 Feb 2015 17:54:34 +0000 (17:54 +0000)
Use the text() jQuery function instead of the html()
one for security reasons.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
lib/toaster/toastergui/static/js/layerdetails.js

index 2793225d0c1db7a4d2966ae924bd0fabf865dbb8..9339ae8bccf7e3bbc49a7a2138218b8370eddd74 100644 (file)
@@ -252,10 +252,10 @@ function layerDetailsPageInit (ctx) {
           break;
       }
 
-      alertMsg.append("You have deleted <strong>1</strong> layer from <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span>");
+      alertMsg.append("You have deleted <strong>1</strong> layer from <a id=\"project-affected-name\"></a>: <strong id=\"layer-affected-name\"></strong>");
     }
 
-    alertMsg.children("#layer-affected-name").html("<strong>" + ctx.layerVersion.name + "</strong>");
+    alertMsg.children("#layer-affected-name").text(ctx.layerVersion.name);
     alertMsg.children("#project-affected-name").text(ctx.projectName);
     alertMsg.children("#project-affected-name").attr("href", ctx.projectPageUrl);
     $("#alert-area").show();