Bump path-parse from 1.0.6 to 1.0.7
[KisSync.git] / test / xss.js
blobbd9e4884bb9f2f5d2af98ada3c727d153a809e53
1 const assert = require('assert');
2 const XSS = require('../lib/xss');
4 describe('XSS', () => {
5 describe('sanitizeHTML', () => {
6 it('behaves consistently w.r.t. special chars used in emotes', () => {
7 const input = '`^~=| _-,;:!?/."()[]{}@$*\\&#%+á\t';
8 const expected = '`^~=| _-,;:!?/."()[]{}@$*\\&#%+á\t';
9 assert.strictEqual(XSS.sanitizeHTML(input), expected);
10 });
12 it('disallows iframes', () => {
13 const input = '<iframe src="https://example.com"></iframe>';
14 const expected = '';
15 assert.strictEqual(XSS.sanitizeHTML(input), expected);
16 });
17 });
18 });