@tiptap/extension-link
Advanced tools
Comparing version 2.1.12 to 2.1.13
@@ -199,2 +199,9 @@ import { combineTransactionSteps, getChangedRanges, findChildrenInRange, getMarksBetween, getAttributes, Mark, mergeAttributes, markPasteRule } from '@tiptap/core'; | ||
renderHTML({ HTMLAttributes }) { | ||
var _a; | ||
// False positive; we're explicitly checking for javascript: links to ignore them | ||
// eslint-disable-next-line no-script-url | ||
if ((_a = HTMLAttributes.href) === null || _a === void 0 ? void 0 : _a.startsWith('javascript:')) { | ||
// strip out the href | ||
return ['a', mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }), 0]; | ||
} | ||
return ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; | ||
@@ -201,0 +208,0 @@ }, |
@@ -201,2 +201,9 @@ (function (global, factory) { | ||
renderHTML({ HTMLAttributes }) { | ||
var _a; | ||
// False positive; we're explicitly checking for javascript: links to ignore them | ||
// eslint-disable-next-line no-script-url | ||
if ((_a = HTMLAttributes.href) === null || _a === void 0 ? void 0 : _a.startsWith('javascript:')) { | ||
// strip out the href | ||
return ['a', core.mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }), 0]; | ||
} | ||
return ['a', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; | ||
@@ -203,0 +210,0 @@ }, |
{ | ||
"name": "@tiptap/extension-link", | ||
"description": "link extension for tiptap", | ||
"version": "2.1.12", | ||
"version": "2.1.13", | ||
"homepage": "https://tiptap.dev", | ||
@@ -35,4 +35,4 @@ "keywords": [ | ||
"devDependencies": { | ||
"@tiptap/core": "^2.1.12", | ||
"@tiptap/pm": "^2.1.12" | ||
"@tiptap/core": "^2.1.13", | ||
"@tiptap/pm": "^2.1.13" | ||
}, | ||
@@ -39,0 +39,0 @@ "peerDependencies": { |
@@ -124,2 +124,8 @@ import { Mark, markPasteRule, mergeAttributes } from '@tiptap/core' | ||
renderHTML({ HTMLAttributes }) { | ||
// False positive; we're explicitly checking for javascript: links to ignore them | ||
// eslint-disable-next-line no-script-url | ||
if (HTMLAttributes.href?.startsWith('javascript:')) { | ||
// strip out the href | ||
return ['a', mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: '' }), 0] | ||
} | ||
return ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0] | ||
@@ -126,0 +132,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119469
1327