Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For the below code, how do I resolve the cross scripting flaw? Is there a another way to write window.open?

<td align="right">
   <a class="button" 
      href="javascript:void(0);" 
      onclick="window.open('Displayxxxx.aspx?WID=<%=Request.QueryString("xxxx") %>','Displayxxx','width=800,height=500,menubar=0,toolbar=no,resizable=no,scrollbars=yes')">

      <input id="btnDisplayTaggedCode" class="button" type="button" value="xxxx" runat="server" visible="True"/>
   </a>
    
   <asp:Button runat="server" CssClass="button" Text="Close" ID="btnCancel"/>
</td>


What I have tried:

I have tried to add a
validateRequest="false"
in the page tag above
Posted
Updated 9-Apr-18 20:51pm

1 solution

Hello you might get more help from here
Prevent cross-site scripting attacks by encoding HTML responses[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900