umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.36k stars 2.64k forks source link

Rich text property editor generates incorrect markup for local links #16631

Open AndyButland opened 1 week ago

AndyButland commented 1 week ago

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

14.0.0

Bug summary

At least I think that's the case. I'm using the rich text property editor in Forms (but I also see the same markup generated when I used it as a property editor on a data type when editing content).

If you add a link to a local page you get markup like this:

<p><a type="document" href="/{localLink:7af493ff-ed1c-4d37-96e3-78c261f93bbc}" title="People">Link to page</a></p>

In V13 it would look like this:

<p><a href="/{localLink:umb://document/7af493ffed1c4d3796e378c261f93bbc}" title="People">Link to page</a></p>

The V14 version isn't handled correctly on the front-end nor when passed through the IApiRichTextMarkupParser implementation.

Steps to reproduce

Add a rich text editor to a document type, allowing entry of links and being able to view the source code. Add a link to a page via the rich text editor and view the source code.

Expected result / actual result

Expected the same markup generated for the href attribute as found in V13.