Add attachment text extraction, auto web news skill, and chat/voice UI updates.
Simplify asset upload temp paths, refresh deploy docs for Aliyun DNS topology, and ship MindSpace content-scan and auth improvements. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,6 +35,22 @@ test('scanContent blocks html active content and private references', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('scanContent can allow active html as acknowledgeable publication warnings', () => {
|
||||
const result = scanContent(
|
||||
'<button onclick="restartGame()">重新开始</button><script>requestAnimationFrame(loop)</script>',
|
||||
{ format: 'html', allowHtmlActiveContent: true },
|
||||
);
|
||||
assert.equal(result.status, 'warned');
|
||||
assert.equal(result.allowed, true);
|
||||
assert.deepEqual(
|
||||
result.findings.map((finding) => [finding.type, finding.blocking]),
|
||||
[
|
||||
['html_script', false],
|
||||
['html_inline_handler', false],
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
test('redactContent masks secrets and strips unsafe html', () => {
|
||||
const result = redactContent(
|
||||
'手机号 13800138000\n邮箱 john@example.com\n<script>alert(1)</script>\nkey=sk_test_1234567890abcdef',
|
||||
|
||||
Reference in New Issue
Block a user