mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-04 07:14:02 +01:00
* Move action handling code to rcmail class * Add rcmail_action class * Add action aliases * Get rid of $OUTPUT global * Move some methods from rcmail to rcmail_action * PHP8 compat. fixes * Add framework for testing actions * Fix obvious code mistakes
24 lines
522 B
PHP
24 lines
522 B
PHP
<?php
|
|
|
|
/**
|
|
* Test class to test rcmail_attachment_handler class
|
|
*
|
|
* @package Tests
|
|
*/
|
|
class Rcmail_RcmailAttachmentHandler extends ActionTestCase
|
|
{
|
|
|
|
/**
|
|
* Test rcmail_action::svg_filter()
|
|
*/
|
|
function test_svg_filter()
|
|
{
|
|
$svg = '<svg><a xlink:href="javascript:alert(1)"><text x="20" y="20">XSS</text></a></svg>';
|
|
$exp = '<svg><a><text x="20" y="20">XSS</text></a></svg>';
|
|
|
|
$out = rcmail_attachment_handler::svg_filter($svg);
|
|
|
|
$this->assertSame($exp, $out);
|
|
}
|
|
}
|