'
),
// no quotes and no semicolon - http://ha.ckers.org/xss.html
array(
'
)
',
'
![]()
'
),
// embedded encoded tab to break up XSS - http://ha.ckers.org/xss.html
array(
'
;)
',
'
![]()
'
),
// issue 178
array(
"
\")
",
'

'
),
// issue 534
array(
'

*/" onerror="console.log(\'Yet another XSS\')">',
'

*/" onerror="console.log(\'Yet another XSS\')">'
),
// issue 602
array(
'

',
'

'
)
);
}
/**
* @dataProvider provider
*/
public function testXss($source, $expected)
{
$result = removeHackTag($source);
$this->assertEquals($result, $expected);
}
}