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

Parse exceptions when copying and pasting hyperlink whose address contains " #8290

Closed
3 tasks done
Zuoqiu-Yingyi opened this issue May 17, 2023 · 1 comment
Closed
3 tasks done
Assignees
Labels
Milestone

Comments

@Zuoqiu-Yingyi
Copy link
Contributor

Zuoqiu-Yingyi commented May 17, 2023

复制地址含有 " 的超链接后粘贴时会解析异常

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

复现过程

  1. 插入一个超链接, 链接地址为 http://foo "bar", 链接锚文本为 123, 链接标题为 baz
    image
  2. 复制该超链接, 剪贴板内文本为 [123](http://foo "bar" "baz"), 可以发现, 链接中的空格与 " 未转义
  3. 粘贴刚刚复制的超链接, DOM 会暴露, 应该是因为 " 未转义的缘故
    image

注: 使用 API 插入如下样式的超链接也无法正常插入, 第一个 " 后面的内容会丢失

[123](<http://foo "bar" baz>)

image

Expected result

方案1: 复制超链接时对超链接地址进行 URI 编码, 粘贴超链接后对超链接地址进行 URI 解码
方案2: 粘贴超链接生成 <span> 标签时转义超链接地址中的 "

Screenshot or screen recording presentation

No response

Version environment

- Version: 2.8.8
- Operating System: 
- Browser (if used):

Log file

无有效信息输出

More information

No response

@88250 88250 added the Bug label May 17, 2023
@88250 88250 changed the title 复制地址含有 " 的超链接后粘贴时会解析异常 | Parse exceptions when copying and pasting hyperlink whose address contains " Parse exceptions when copying and pasting hyperlink whose address contains " May 17, 2023
@88250 88250 added this to the 2.8.9 milestone May 17, 2023
Vanessa219 added a commit that referenced this issue May 17, 2023
Vanessa219 added a commit that referenced this issue May 17, 2023
@88250 88250 self-assigned this May 18, 2023
88250 added a commit to 88250/lute that referenced this issue May 18, 2023
@88250
Copy link
Member

88250 commented May 18, 2023

12"3

@88250 88250 closed this as completed May 18, 2023
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

3 participants