Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API /api/attr/setBlockAttrs 设置属性值转义问题 #6198

Closed
88250 opened this issue Oct 14, 2022 · 0 comments
Closed

API /api/attr/setBlockAttrs 设置属性值转义问题 #6198

88250 opened this issue Oct 14, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@88250
Copy link
Member

88250 commented Oct 14, 2022

    @88250 又发现了一个 bug, 使用 API `/api/attr/setBlockAttrs` 设置 `data-export-md` 属性, 再使用 API `/api/attr/getBlockAttrs` 获取时, 有许多符号都进行了 HTML 转义

下面是/api/attr/setBlockAttrs 中设置的 data-export-md 属性值

```markdown
"
<
>
&
```

下面是/api/attr/getBlockAttrs 中获得的 data-export-md 属性值

```markdown
&quot;
&lt;
&gt;
&amp;
```

可能和 #4180 相关
经测试, 该问题与块属性名无关, 使用 API 写入 custom-xxx 属性后再使用 API 读取也会造成该问题
经测试, 使用 API /api/attr/setBlockAttrs 设置的块属性使用编辑器中属性对话框读取也是异常的
经测试, 使用编辑器中属性对话框中设置的块属性使用 API /api/attr/getBlockAttrs 读取是正常的
经测试, 无论是否使用代码围栏 ```, 该问题均会出现

Originally posted by @Zuoqiu-Yingyi in #6142 (comment)

@88250 88250 self-assigned this Oct 14, 2022
@88250 88250 added the Bug label Oct 14, 2022
@88250 88250 added this to the 2.4.1 milestone Oct 14, 2022
@88250 88250 closed this as completed Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant