You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
This commit is contained in:
@@ -24,6 +24,12 @@ describe('string-utils', () => {
|
||||
'dfasdf', '[', ']', { escapeHtml: true }, '[d]fas[d]f',
|
||||
],
|
||||
[['zzz'], 'zzz<img src=q onerror=eval("require(\'child_process\').exec(\'mate-calc\');");>', 'a', 'b', { escapeHtml: true }, 'azzzb<img src=q onerror=eval("require('child_process').exec('mate-calc');");>'],
|
||||
[['a'], 'non-latin-chars-éão', '<span>', '</span>', { escapeHtml: true }, 'non-l<span>a</span>tin-ch<span>a</span>rs-é<span>ã</span>o'],
|
||||
[['o'], 'Abrir diretório de perfis > (openProfileDirectory)', '<span>', '</span>', { escapeHtml: true },
|
||||
'Abrir diret<span>ó</span>ri<span>o</span> de perfis > (<span>o</span>penPr<span>o</span>fileDirect<span>o</span>ry)'],
|
||||
[[], '<>"\'&', 'a', 'b', { escapeHtml: true }, '<>"'&'],
|
||||
[[], '<>"\'&', 'a', 'b', { escapeHtml: false }, '<>"\'&'],
|
||||
[['a'], 'non-latin-chars-éão', '<<<', '>>>', { escapeHtml: false }, 'non-l<<<a>>>tin-ch<<<a>>>rs-é<<<ã>>>o'],
|
||||
])('should surround keywords with strings (case %#)', (async (keywords, input, prefix, suffix, options, expected) => {
|
||||
const actual = StringUtils.surroundKeywords(keywords, input, prefix, suffix, options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user