Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/marks
diff options
context:
space:
mode:
authorFerdinand Thiessen <rpm@fthiessen.de>2022-07-09 19:51:27 +0300
committerFerdinand Thiessen <rpm@fthiessen.de>2022-07-09 19:55:08 +0300
commit0de91fd4e0b39219ba828d566d21a4c4d9490842 (patch)
treedf61b2d3efc141649a7ee3dfe4daab2e79fe4393 /src/marks
parent806f6c561764100aa033a3ed82da75c5db5fb88f (diff)
Do not unintended remove or modify link titles, fixes #2699
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'src/marks')
-rw-r--r--src/marks/Link.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/marks/Link.js b/src/marks/Link.js
index f6e1d7c4a..14a970af8 100644
--- a/src/marks/Link.js
+++ b/src/marks/Link.js
@@ -38,6 +38,9 @@ const Link = TipTapLink.extend({
href: {
default: null,
},
+ title: {
+ default: null,
+ },
}
},
@@ -48,6 +51,7 @@ const Link = TipTapLink.extend({
tag: 'a[href]',
getAttrs: dom => ({
href: parseHref(dom),
+ title: dom.getAttribute('title'),
}),
},
],
@@ -55,7 +59,6 @@ const Link = TipTapLink.extend({
renderHTML: ({ mark, HTMLAttributes }) => ['a', {
...mark.attrs,
href: domHref(mark),
- title: mark.attrs.href,
rel: 'noopener noreferrer nofollow',
}, 0],