A hyperlink to an anchor are rendered with an additional hash mark "#"


Description

Anchor hyperlinks inserted in a Rich Text field might be rendered with the wrong href attribute value. For example, the expected:

<a href="#">Text</a>
<a href="#&">Text</a>
<a href="# ">Text</a>

are rendered as:

<a href="##">Text</a>
<a href="#&#">Text</a>
<a href="# ##">Text</a>

Solution

To resolve the issue, consider one of the following options:

Alternatively, you can comment out the below processor found in the Sitecore.config file:

<processor type="Sitecore.Pipelines.RenderField.SetAnchorsPositionInLinks, Sitecore.Kernel" />