Sample to Prevent your site of XSS(Cross Site Scripting)

/*To prevent with XSS*/
function cleanText(str){
var result = str.replace(/</g, "&lt;").replace(/>/g, "&gt;");
return result;
}
/*//To prevent with XSS*/
Previous Post Next Post