The page crashes and gives "Length cannot be less than zero." when i insert a Sitecore link in the RTE.
It happens as soon as you visit the specefic page on the site. The error is not thrown when you are browsing the page from the Experience editor.
Has anyone experienced this kind of behaviour before?
Stack trace
[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
System.String.Substring(Int32 startIndex, Int32 length) +14415580
Sitecore.Pipelines.RenderField.ProtectedImageLinkRenderer.ReplaceReference(String tagHtml, String urlAttribute) +300
Sitecore.Pipelines.RenderField.ProtectedImageLinkRenderer.HashReferences(String renderedText, String tagName, String urlAttribute) +802
Sitecore.Pipelines.RenderField.ProtectedImageLinkRenderer.Process(RenderFieldArgs args) +121
(Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Web.UI.WebControls.FieldRenderer.RenderField() +942
Sitecore.Web.UI.WebControls.FieldControl.DoRender(HtmlTextWriter output) +255
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
Sitecore.Web.UI.WebControls.Sublayout.DoRender(HtmlTextWriter output) +49
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
Sitecore.Web.UI.WebControls.Placeholder.DoRender(HtmlTextWriter output) +134
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
Sitecore.Web.UI.WebControls.Sublayout.DoRender(HtmlTextWriter output) +49
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
Sitecore.Web.UI.WebControls.Placeholder.DoRender(HtmlTextWriter output) +134
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
Sitecore.Web.UI.WebControls.Sublayout.DoRender(HtmlTextWriter output) +49
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
Sitecore.Web.UI.WebControls.Placeholder.DoRender(HtmlTextWriter output) +134
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +11868329
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
Sitecore.Web.FormAdapter.Render(HtmlTextWriter writer) +76
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +116
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +50
ASP.layouts_linak_site_linak_html_body_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\28c1c560\ff0e1871\App_Web_iitpqjv4.0.cs:0
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +263
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
Sitecore.Web.UI.WebControls.Sublayout.DoRender(HtmlTextWriter output) +49
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3499