WALA/com.ibm.wala.cast.js.test.data/examples-src/pages/page1.html

20 lines
302 B
HTML

<HTML>
<TITLE>encodeURI Sanitation</TITLE>
Hi
<SCRIPT>
var pos=document.URL.indexOf("name=")+5;
var txt = document.URL.substring(pos,document.URL.length); // bad thing
encodedTxt = encodeURI(txt); // sanitizer
document.write(encodedTxt); // safe use
</SCRIPT>
<BR>
Welcome to our system
</HTML>