diff options
Diffstat (limited to 'tests/lib/template.php')
-rw-r--r-- | tests/lib/template.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/lib/template.php b/tests/lib/template.php index 40aec402347..299eb2b9369 100644 --- a/tests/lib/template.php +++ b/tests/lib/template.php @@ -27,13 +27,15 @@ class Test_TemplateFunctions extends PHPUnit_Framework_TestCase { $loader->load('OC_Template'); } - public function testP() { + public function testPJavaScript() { $badString = '<img onload="alert(1)" />'; ob_start(); p($badString); $result = ob_get_clean(); $this->assertEquals('<img onload="alert(1)" />', $result); + } + public function testPJavaScriptWithScriptTags() { $badString = "<script>alert('Hacked!');</script>"; ob_start(); p($badString); |