Skip to content

Anchors in TinyMCE-links does not allow curly brace #15512

@enkelmedia

Description

@enkelmedia

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.0.3 (but also all other versions back to v8 at least)

Bug summary

I've found a quite rare issue but I wanted to post it and offer a solution.

When using the link picker inside TinyMCE to pick content or media and also adding a query string that contains a } the dialog blows up when editing the link.

image

image

This is because the code that extracts the UDI inside tinymce.service.js assumes that the last } is the closing curly brace of the UDI (if any).

The issue can be seen here:
https://github.com/umbraco/Umbraco-CMS/blob/422218ea1599e961385eca4ec92a5cafb8fbe5f2/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js#L1187C121-L1187C121

I'm thinking that we have a couple of options here:

  • Introduce a "helper" that would take in any URL and successfully extract a UDI from it (if any)
  • At lest update the code so that it discards the query string when trying to figure out the UDI.

Specifics

No response

Steps to reproduce

  • Create a RTE
  • Write text, select and click "Link"-button
  • Pick a content node in the tree
  • Enter anything that contains a } into the anchor-textbox.

Expected result / actual result

Parser should only look at the UDI and allow } to be a part of the URL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions