Avoid a XSS issue

This commit is contained in:
Colin Davis 2013-08-16 12:32:25 -04:00
parent bffcbb7161
commit e9d3bc8358

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>