diff --git a/tests/LDEV4743.cfc b/tests/LDEV4743.cfc new file mode 100644 index 0000000..9d0b33e --- /dev/null +++ b/tests/LDEV4743.cfc @@ -0,0 +1,14 @@ +component extends="org.lucee.cfml.test.LuceeTestCase" labels="esapi" skip=true { + function run( testResults , testBox ) { + describe( title='Testcase for LDEV-4743' , body=function() { + it( title='Checking canonicalize() function with % symbol' , body=function() { + expect( canonicalize("Lucee", false, false) ).toBe( "Lucee" ); + expect( canonicalize("!@##$^&*()_+{}[]:"";''<>, .?/|\~`.", false, false) ).toBe( "!@##$^&*()_+{}[]:"";''<>, .?/|\~`." ); + expect( function() { + var str = '(80 - 100%).pdf'; // Only failed with the '%' symbol + canonicalize(str, false, false); + }).notToThrow(); + }); + }); + } +}