1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Merge pull request from GHSA-m59c-9rrj-c399

* Sanitize HTML in processPastedHtml

* Add test
This commit is contained in:
Henry Heino
2023-07-27 07:41:57 -07:00
committed by GitHub
parent b9659bb9c1
commit a0ec928fca
6 changed files with 48 additions and 4 deletions

View File

@ -0,0 +1,19 @@
const { default: Logger, TargetType } = require('@joplin/lib/Logger');
// TODO: Some libraries required by test-utils.js seem to fail to import with the
// jsdom environment.
//
// Thus, require('@joplin/lib/testing/test-utils.js') fails and some setup must be
// copied.
const logger = new Logger();
logger.addTarget(TargetType.Console);
logger.setLevel(Logger.LEVEL_WARN);
Logger.initializeGlobalLogger(logger);
// @electron/remote requires electron to be running. Mock it.
jest.mock('@electron/remote', () => {
return { require };
});