export default [
[
'protocol-based JS injection: simple, no spaces',
{
input: `foo`,
output: 'foo',
},
],
[
'protocol-based JS injection: simple, spaces before',
{
input: `foo`,
output: 'foo',
},
],
[
'protocol-based JS injection: simple, spaces after',
{
input: `foo`,
output: 'foo',
},
],
[
'protocol-based JS injection: simple, spaces before and after',
{
input: `foo`,
output: 'foo',
},
],
[
'protocol-based JS injection: preceding colon',
{
input: `foo`,
output: 'foo',
},
],
[
'protocol-based JS injection: UTF-8 encoding',
{
input: 'foo',
output: 'foo',
},
],
[
'protocol-based JS injection: long UTF-8 encoding',
{
input: 'foo',
output: 'foo',
},
],
[
'protocol-based JS injection: long UTF-8 encoding without semicolons',
{
input:
'foo',
output: 'foo',
},
],
[
'protocol-based JS injection: hex encoding',
{
input: 'foo',
output: 'foo',
},
],
[
'protocol-based JS injection: long hex encoding',
{
input: 'foo',
output: 'foo',
},
],
[
'protocol-based JS injection: hex encoding without semicolons',
{
input:
'foo',
output: 'foo',
},
],
[
'protocol-based JS injection: null char',
{
input: 'foo',
output: 'foo',
},
],
[
'protocol-based JS injection: invalid URL char',
{ input: '', output: '' },
],
[
'protocol-based JS injection: Unicode',
{
input: `foo`,
output: 'foo',
},
],
[
'protocol-based JS injection: spaces and entities',
{
input: `foo`,
output: 'foo',
},
],
[
'img on error',
{
input: '',
output: '',
},
],
['style tags are removed', { input: ' Foo', output: 'Foo' }],
];