mirror of https://github.com/calzoneman/sync.git
13 lines
443 B
JavaScript
13 lines
443 B
JavaScript
const assert = require('assert');
|
|
const XSS = require('../lib/xss');
|
|
|
|
describe('XSS', () => {
|
|
describe('sanitizeHTML', () => {
|
|
it('behaves consistently w.r.t. special chars used in emotes', () => {
|
|
const input = '`^~=| _-,;:!?/."()[]{}@$*\\&#%+á\t';
|
|
const expected = '`^~=| _-,;:!?/."()[]{}@$*\\\\&#%+á\t';
|
|
assert.strictEqual(XSS.sanitizeHTML(input), expected);
|
|
});
|
|
});
|
|
});
|