Editing links does not remove possible stale data- attributes

Created on 6 February 2020, over 4 years ago
Updated 16 May 2024, 4 months ago

Exacte same issue as #2755403: Edit link don't remove data- attributes β†’ which seems to be reintroduced. Copy from the steps to reproduce from the original ticket:

When editing a link, the data- attributes will in some situations be kept in the old state.

Steps to reproduce:

Add an internal link to an entity (entity:node/1)
The data- attributes will be set
Edit that link, and set an external URL as href.
The data- attributes is the same as before.
This causes the linkit_filter to always override the href.

Expected behavior:

Add an internal link to an entity (entity:node/1)
The data- attributes will be set
Edit that link, and set an external URL as href.
The data- attributes removed.

Original commit that fixed this, which seems gone in current release and dev version: https://git.drupalcode.org/project/linkit/commit/cc3edc5

Attached is a patch that fixes it again.

πŸ› Bug report
Status

Postponed: needs info

Version

7.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium weseze

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024