Socket
Socket
Sign inDemoInstall

@tiptap/extension-link

Package Overview
Dependencies
Maintainers
4
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.12 to 2.1.13

7

dist/index.js

@@ -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 @@ },

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc