Anchor links with spaces become broken


Description

If an anchor link name contains spaces it might result in the link being formatted incorrectly on a website.

For example:

<a href="#Mandatory Leave Laws and SDI" class="Hypertext">Mandatory Leave Laws and SDI</a>

is formatted in

<a href=" Leave Laws and SDI#Mandatory" class="Hypertext">Mandatory Leave Laws and SDI</a>

Solution

To make the link formatted correctly:

  1. Open \App_Config\Sitecore.config file.
  2. Comment out the following processor:
    <!--<processor type="Sitecore.Pipelines.RenderField.SetAnchorsPositionInLinks, Sitecore.Kernel" />-->

Alternatively, you can use anchors without spaces.