Skip to content

[BUG] 插件JS crash: Failed to execute 'parseFromString' on 'DOMParser': This document requires 'TrustedHTML' assignment. #1239

@fireattack

Description

@fireattack

问题描述

在运行某脚本的某个功能时, scriptcat自己的 content js 崩溃了,提示 This document requires 'TrustedHTML' assignment.

重现步骤

  1. 安装此脚本: https://github.com/qsniyg/maxurl/raw/refs/heads/master/userscript_smaller.user.js
  2. 打开 https://docs.google.com/forms/d/e/1FAIpQLSeAGfm0UUoQbBQnGR1fT8YcXJZvxaSYJTHUY_SqFt295RVVCA/viewform
  3. 使用这个脚本的这个功能:
Image
  1. 0b4675ed-54fa-4f5e-97aa-c0c3fd50cc35 这个scriptcat自带的js崩溃

脚本猫版本

1.2.4

操作系统以及浏览器信息

Win10, Chrome 144.0.7559.133 (Official Build) (64-bit) (cohort: Stable)

补充信息 (选填)

报错信息(网页的console):

32eff70a-ec41-43da-bb73-dc22c6861c8c:2 This document requires 'TrustedHTML' assignment. The action has been blocked.
get responseXML	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
shallowcopy_obj	@	Image Max URL.user.js:3064
shallowcopy	@	Image Max URL.user.js:3079
data.onload	@	Image Max URL.user.js:2137
n	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
Z	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
(anonymous)	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
R	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
(anonymous)	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
a.emit	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
messageHandle	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
(anonymous)	@	32eff70a-ec41-43da-bb73-dc22c6861c8c:2
nativeSend	@	4460e46c-3b1c-40bc-8132-95cb9aeb7620:2
postMessage	@	4460e46c-3b1c-40bc-8132-95cb9aeb7620:2
sendMessage	@	4460e46c-3b1c-40bc-8132-95cb9aeb7620:2
(anonymous)	@	4460e46c-3b1c-40bc-8132-95cb9aeb7620:2


Uncaught (in promise) TypeError: Failed to execute 'parseFromString' on 'DOMParser': This document requires 'TrustedHTML' assignment.
    at get responseXML (32eff70a-ec41-43da-bb73-dc22c6861c8c:2:19444)
    at Object.assign (<anonymous>)
    at shallowcopy_obj (Image Max URL.user.js:3064:18)
    at shallowcopy (Image Max URL.user.js:3079:12)
    at data.onload (Image Max URL.user.js:2137:18)
    at n (32eff70a-ec41-43da-bb73-dc22c6861c8c:2:21025)
    at Z (32eff70a-ec41-43da-bb73-dc22c6861c8c:2:15701)
    at 32eff70a-ec41-43da-bb73-dc22c6861c8c:2:22241
    at new Promise (<anonymous>)
    at R (32eff70a-ec41-43da-bb73-dc22c6861c8c:2:22089)

Sub-issues

Metadata

Metadata

Assignees

Labels

compatibility其它管理器可以运行,脚本猫不能运行

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions