Skip to content

Commit

Permalink
🐛 fix #1264
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Aug 4, 2022
1 parent 5c21356 commit 99ff7f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -105,6 +105,7 @@

### v3.8.16 / 2022-07

* [1264](https://github.com/Vanessa219/vditor/issues/1264) 链接中,会强制将&reg解析为 ® 字符 `修复缺陷`
* [1242](https://github.com/Vanessa219/vditor/issues/1242) 在即时渲染模式下表格源文件未对齐 `改进功能`

### v3.8.15 / 2022-05-24
Expand Down
4 changes: 2 additions & 2 deletions src/ts/util/fixBrowserBehavior.ts
Expand Up @@ -1338,11 +1338,11 @@ export const paste = async (vditor: IVditor, event: (ClipboardEvent | DragEvent)
xhr.send(JSON.stringify({url: src}));
}
if (vditor.currentMode === "ir") {
return [`<span class="vditor-ir__marker vditor-ir__marker--link">${src}</span>`, Lute.WalkContinue];
return [`<span class="vditor-ir__marker vditor-ir__marker--link">${Lute.EscapeHTMLStr(src)}</span>`, Lute.WalkContinue];
} else if (vditor.currentMode === "wysiwyg") {
return ["", Lute.WalkContinue];
} else {
return [`<span class="vditor-sv__marker--link">${src}</span>`, Lute.WalkContinue];
return [`<span class="vditor-sv__marker--link">${Lute.EscapeHTMLStr(src)}</span>`, Lute.WalkContinue];
}
};

Expand Down
2 changes: 2 additions & 0 deletions types/index.d.ts
Expand Up @@ -114,6 +114,8 @@ declare class Lute {

public static New(): Lute;

public static EscapeHTMLStr(html:string): string;

public static GetHeadingID(node: ILuteNode): string;

public static NewNodeID(): string;
Expand Down

0 comments on commit 99ff7f2

Please sign in to comment.