In a server-side Classic ASP file, let's say you receive a Request string containing malicious javascript like, "alert('HACKED');
"
DIM foo : foo = Request.Form("foo"); 'Contains malicious javascript
and then later we're writing javascript to screen containing that value.
%>
<script type="text/javascript">
// some code
<%=foo %>
// some more code
</script>
<%
What do we do here keep ourselves safe against this form of cross-site scripting?