From e9d3bc835879726d9bef4f4e8e0fe8216295a1ea Mon Sep 17 00:00:00 2001 From: Colin Davis Date: Fri, 16 Aug 2013 12:32:25 -0400 Subject: [PATCH] Avoid a XSS issue --- templates/root.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/root.html b/templates/root.html index 47ce6f1..08a53f7 100644 --- a/templates/root.html +++ b/templates/root.html @@ -215,9 +215,7 @@ function submitform() { var x = document.getElementById("idimg"); x.setAttribute("src", "https://robohash.org/" + document.getElementById("textform").query.value ); - var y = document.getElementById("YourIP"); - y.innerHTML = "http://robohash.org/" + document.getElementById("textform").query.value; - + $("#YourIP").text( "http://robohash.org/" + document.getElementById("textform").query.value); }