File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,14 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="guard" {
44 describe ( title = " Testcase for sanitizeHTML function" , body = function () {
55 it ( title = " checking sanitizeHTML() function" , body = function ( currentSpec ) {
66 var html = ' <!DOCTYPE html><html><body><h2>HTML Forms</h2><form action="/action_page.cfm"><label for="fname">First name:</label><br><input type="text" id="fname" name="fname"value="Pothys"><br></body></html>' ;
7+
8+ var res = SanitizeHtml (html );
9+ res = reReplace (res , " \s" , " " , " all" );
10+ expect (res ).toBe (' <h2>HTML Forms</h2>First name:<br /><br />' );
711
8- expect (SanitizeHtml (html )).toBe (' <h2>HTML Forms</h2>First name:<br /><br />' );
9- expect (html .SanitizeHtml ()).toBe (' <h2>HTML Forms</h2>First name:<br /><br />' ); // member function
12+ var res = html .SanitizeHtml ();
13+ res = reReplace (res , " \s" , " " , " all" );
14+ expect (res ).toBe (' <h2>HTML Forms</h2>First name:<br /><br />' ); // member function
1015 });
1116 });
1217 }
You can’t perform that action at this time.
0 commit comments