[Sanitization] VerifyJavascriptLiteral

[Sanitization] VerifyJavascriptLiteral

  

Hi,

I test this function with the following examples:

"Function1();"

"Function1(1,2,3);"

"Function"

"if(parseFloat($(this).val().replace('.','').replace(',','.')) > 0)
{
    $(this).attr('formvalidation','valid')
}
else
{
    $(this).attr('formvalidation','invalid')
};"

Result "INVALID JAVASCRIPT LITERAL".

Can someone provide examples of JavaScript accepted by this action?

Thank you

I don't know exactly what constitutes an valid javascript literal, but I think this action is made precisely to verify that something DOESN'T contain javascript elements that might possible be used in a javascript injection attack, so I would bet anything that has unescaped ' or " or ; will be invalid.