Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove src attribute on <img> to avoid failing with fetch not existing in JSDOM #344

Merged
merged 1 commit into from Nov 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/sanitize-html.test.js
Expand Up @@ -3,6 +3,6 @@
const sanitizeHTML = require('../src/sanitize-html');

test('Tests for sanitized HTML', async () => {
const data = await sanitizeHTML.run('<img src=x onerror=alert(1)>');
expect(data).toBe('<img src="x">');
const data = await sanitizeHTML.run('<img onerror="alert(1)">');
expect(data).toBe('<img>');
});