fix: Sanitize url before opening

This commit is contained in:
Tom Moor
2022-11-02 21:38:16 -04:00
parent 881ea34dfe
commit 6f8d01df21

View File

@@ -167,7 +167,10 @@ export default class Link extends Mark {
if (this.options.onClickLink) {
event.stopPropagation();
event.preventDefault();
this.options.onClickLink(linkMark.attrs.href, event);
this.options.onClickLink(
sanitizeUrl(linkMark.attrs.href),
event
);
}
} catch (err) {
this.editor.props.onShowToast(