mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-02 09:32:43 +00:00
Adding additional tests to expand coverage of stripping script elements.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7494 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c54fd3c720
commit
d8e1778a0d
1 changed files with 6 additions and 1 deletions
|
@ -447,7 +447,12 @@ class HelperTest extends CakeTestCase {
|
|||
|
||||
$result = $this->Helper->clean('<script>with something</script>');
|
||||
$this->assertEqual($result, 'with something');
|
||||
|
||||
|
||||
$result = $this->Helper->clean('<script type="text/javascript">alert("ruined");</script>');
|
||||
$this->assertEqual($result, 'alert("ruined");');
|
||||
|
||||
$result = $this->Helper->clean("<script \ntype=\"text/javascript\">\n\talert('ruined');\n\n\t\t</script>");
|
||||
$this->assertEqual($result, "\n\talert('ruined');\n\n\t\t");
|
||||
}
|
||||
/**
|
||||
* tearDown method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue