1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Desktop: PDF search text: Remove NULL characters early to avoid possible sync issues (#9862)

This commit is contained in:
Henry Heino
2024-02-06 08:24:00 -08:00
committed by GitHub
parent 8b9ce9ec72
commit a906e73b22
7 changed files with 49 additions and 5 deletions

View File

@ -0,0 +1,8 @@
import replaceUnsupportedCharacters from './replaceUnsupportedCharacters';
describe('replaceUnsupportedCharacters', () => {
test('should replace NULL characters', () => {
expect(replaceUnsupportedCharacters('Test\x00...')).toBe('Test�...');
expect(replaceUnsupportedCharacters('\x00Test\x00...')).toBe('�Test�...');
});
});