mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Add jquery-latest.js to blacklist
http://code.jquery.com/jquery-latest.js 와 같은 스크립트를 임의로 로딩하지 못하도록 막음. 버전이 붙은 파일명은 이미 대부분 막혀 있었지만, 이 커밋에서는 -latest가 포함된 것도 막도록 변경함. cf. https://xetown.com/qna/1089463
This commit is contained in:
parent
7a97084df9
commit
e027bc8319
2 changed files with 2 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ class HTMLDisplayHandler
|
||||||
* List of scripts to block loading
|
* List of scripts to block loading
|
||||||
*/
|
*/
|
||||||
public static $blockedScripts = array(
|
public static $blockedScripts = array(
|
||||||
'@(?:^|/)j[Qq]uery(?:-[0-9]+(?:\.[0-9x]+)*)?(?:\.min)?\.js$@',
|
'@(?:^|/)j[Qq]uery(?:-[0-9]+(?:\.[0-9x]+)*|-latest)?(?:\.min)?\.js$@',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,7 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test
|
||||||
$handler->loadFile(array('./common/js/jquery-1.x.min.js'));
|
$handler->loadFile(array('./common/js/jquery-1.x.min.js'));
|
||||||
$handler->loadFile(array('./common/js/jquery-2.0.0.js'));
|
$handler->loadFile(array('./common/js/jquery-2.0.0.js'));
|
||||||
$handler->loadFile(array('./common/js/jQuery.min.js'));
|
$handler->loadFile(array('./common/js/jQuery.min.js'));
|
||||||
|
$handler->loadFile(array('http://code.jquery.com/jquery-latest.js'));
|
||||||
$result = $handler->getCssFileList();
|
$result = $handler->getCssFileList();
|
||||||
$this->assertEquals(0, count($result));
|
$this->assertEquals(0, count($result));
|
||||||
$result = $handler->getJsFileList();
|
$result = $handler->getJsFileList();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue