Duplicate hash parameters in image links

  • Description

    When rendering an image with a link wrapping it, the image protection hash is added to the URL twice.

    For example, the following code:

    @Html.Sitecore().Field("Link", Model.Item, new { text = @Html.Sitecore().Field("Image", Model.Item) })

    will add two hash attributes on the IMG tag and cause an error:

    <a href="/"><img src="/-/media/Images/Image.ashx?h=65&amp;la=en&amp;w=230&amp;hash=11E08BC86FF041320282A22BA00C6711EEB3D189&amp;hash=11E08BC86FF041320282A22BA00C6711EEB3D189" alt="Image" width="230" height="65" /></a>

Applies to:

CMS 8.1 Initial Release - 9.1 Update-1

CMS 9.2 Initial Release

March 12, 2019
August 01, 2019

Reference number:

97023