|
|
@@ -615,8 +615,8 @@ class HtmlHelperTest extends TestCase
|
|
|
$expected['link']['href'] = 'x:"><script>alert(1)</script>';
|
|
|
$this->assertHtml($expected, $result);
|
|
|
|
|
|
- $result = $this->Html->css('http://whatever.com/screen.css?1234');
|
|
|
- $expected['link']['href'] = 'preg:/http:\/\/.*\/screen\.css\?1234/';
|
|
|
+ $result = $this->Html->css('http://whatever.com/screen.css?1234&a=b');
|
|
|
+ $expected['link']['href'] = 'http://whatever.com/screen.css?1234&a=b';
|
|
|
$this->assertHtml($expected, $result);
|
|
|
|
|
|
Configure::write('App.cssBaseUrl', '//cdn.cakephp.org/css/');
|
|
|
@@ -962,6 +962,18 @@ class HtmlHelperTest extends TestCase
|
|
|
];
|
|
|
$this->assertHtml($expected, $result);
|
|
|
|
|
|
+ $result = $this->Html->script('//domain.com/test.json.js?foo=bar&other=test');
|
|
|
+ $expected = [
|
|
|
+ 'script' => ['src' => '//domain.com/test.json.js?foo=bar&other=test'],
|
|
|
+ ];
|
|
|
+ $this->assertHtml($expected, $result);
|
|
|
+
|
|
|
+ $result = $this->Html->script('https://domain.com/test.json.js?foo=bar&other=test');
|
|
|
+ $expected = [
|
|
|
+ 'script' => ['src' => 'https://domain.com/test.json.js?foo=bar&other=test'],
|
|
|
+ ];
|
|
|
+ $this->assertHtml($expected, $result);
|
|
|
+
|
|
|
$result = $this->Html->script('x:"><script>alert(1)</script>');
|
|
|
$expected = [
|
|
|
'script' => ['src' => 'x:"><script>alert(1)</script>'],
|