Skip to content

Commit d4bd4b3

Browse files
committed
Add language whitespace test
1 parent a134e82 commit d4bd4b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/phpunit/tests/html-api/wpHtmlTagProcessorScriptTag.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ public static function data_is_javascript_script_tag(): array {
102102
'Script tag with language="jscript"' => array( '<script language="jscript"></script>', true ),
103103
'Script tag with language="livescript"' => array( '<script language="livescript"></script>', true ),
104104

105+
// Whitespace is not trimmed in the langauge attribute.
106+
'Script tag with language=" javascript"' => array( '<script language=" javascript"></script>', false ),
107+
105108
// Non-JavaScript script tags - should NOT be JavaScript.
106109
'Script tag with importmap type' => array( '<script type="importmap"></script>', false ),
107110
'Script tag with speculationrules type' => array( '<script type="speculationrules"></script>', false ),

0 commit comments

Comments
 (0)