Cross-Site Scripting in qunit.js file

Cross-Site Scripting in qunit.js file

Hi Friends,

We are facing Cross-Site scripting issue in qunit.js file.

Please find the code snippet below.: 

if ( window.location )

{

window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text);                                        

}

I have attached the report screen snap for this issue.

Please look into this and give your suggestion regarding this vulnerability.

Thanks,
Arun