mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Add option to escape() to keep user lang codes intact #1976
This commit is contained in:
parent
170f7f95b9
commit
8abe1b1d7d
2 changed files with 14 additions and 3 deletions
|
|
@ -39,6 +39,9 @@ class FunctionsTest extends \Codeception\TestCase\Test
|
|||
$this->assertEquals('<foo>invalid'. "\xEF\xBF\xBD" . 'unicode</foo>', escape('<foo>invalid' . "\xE4\xA8" . 'unicode</foo>'));
|
||||
$this->assertEquals('<foo>invalid'. "\xEF\xBF\xBD" . 'unicode</foo>', escape('<foo>invalid' . "\xE4\xA8" . 'unicode</foo>', false));
|
||||
|
||||
$this->assertEquals('$user_lang->userLang1234567890', escape('$user_lang->userLang1234567890', true, false));
|
||||
$this->assertEquals('$user_lang->userLang1234567890', escape('$user_lang->userLang1234567890', true, true));
|
||||
|
||||
$this->assertEquals('expressionalertXSS', escape_css('expression:alert("XSS")'));
|
||||
$this->assertEquals('#123456', escape_css('#123456'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue