Avoid a XSS issue

This commit is contained in:
Robohash 2013-08-16 12:32:25 -04:00
parent 3ed19f4271
commit 1c90774ffd

View File

@ -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);
}
</script>