Drop name attribute from basic_html anchor element

Created on 8 May 2023, about 1 year ago
Updated 10 May 2023, about 1 year ago

Problem/Motivation

Sector allows name attribute in basic_html https://git.drupalcode.org/project/sector/-/blob/9.5.x/config/install/fi..., but name attribute is obsolete in HTML5 and should not be used (see https://html.spec.whatwg.org/multipage/obsolete.html#obsolete-but-confor.... Drupal standard profile doesn't support name attribute in basic_html by default https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/profiles/sta...

Steps to reproduce

Add markup in text area supporting anchors. Add name attribute to anchor, save node. Name attribute is not stripped by basic_html filter.

Proposed resolution

Remove name attribute from basic_html filter.

Remaining tasks

Patch!

πŸ› Bug report
Status

Needs work

Version

10.0

Component

Code

Created by

πŸ‡³πŸ‡ΏNew Zealand jonathan_hunt

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

Comments & Activities

  • Issue created by @jonathan_hunt
  • πŸ‡³πŸ‡ΏNew Zealand jonathan_hunt

    Looks like name will continue to be allowed if CKEditor Anchor plugin is used, for both CKEditor4 and CKEditor5.

  • πŸ‡³πŸ‡ΏNew Zealand HeikeT

    Hi Jonathan,

    Yes, that is a thrown in the eye forever and comes from the CKEditor Anchor plugin. We are currently reviewing options to allow content editors to easily place anchors using ids. If you come across something let me know!

    We are also moving Sector 9.5 into a maintenance and security updates only phase while we are getting Sector 10 prepared!

    More very soon!

    Heike

  • Status changed to Needs work about 1 year ago
  • πŸ‡³πŸ‡ΏNew Zealand HeikeT

    Moved to Sector 10 dev to remind us that we need to find a better solution!

Production build 0.69.0 2024