Anchor link removes accented unicode in hash vs replacing with ASCII equivalent

Created on 6 May 2025, about 2 months ago

Problem/Motivation

I have an accordion with the title EnEspanol that includes a tilde n as to be correct- when creating the anchor link this gets stripped out rather than replaced by an n. We are trying to provide a link to a drop-down containing spanish documents and it should be /URL#enespanol and instead it is URL/#enespaol - which is less than ideal especially for sharing as a URL with people.

Steps to reproduce

Create an CKEditor accordion block with an accented character for the title, enable Open tabs with hash using anchor links or on page load - look at the resulting anchor link.

Proposed resolution

In accordion.frontend.js the tabText around 159 should have accented characters replaced with the best ASCII code character vs. stripping them completely since according to https://www.rfc-editor.org/rfc/rfc3986#section-2 - only ASCII characters should be included in URI and I assume this includes anchor links.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States robbt

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

Comments & Activities

Production build 0.71.5 2024