Sharepoint 2013 Assigned to Field Showing HTML Code

Sharepoint 2013 Assigned to Field Showing HTML Code

I came across this issue today at work. I found multiple blog posts detailing the issue including this one and this other but unfortunately the code mentioned in both places threw an error in SharePoint 2013.

Both recommend adding display-output-escaping="yes" to the field in SP Designer:

<xsl:value-of select="@VariableName" display-output-escaping="yes"></xsl:value-of>

It turns out that in SharePoint 2013 that fails with the error:

In XHTML 1.0 Strict the attribute ‘display-output-escaping’ is not permitted for the <xsl:value-of> tag

I was however able to get it to display correctly with the attribute:

<xsl:value-of select="@AssignedTo" disable-output-escaping="yes"/>

Notice the lack of a closing tag for that field? I thought that was not valid XHTML, but I suppose that changed for SharePoint 2013. Now the field displays properly.

Sharepoint 2013 Assigned to Field Showing HTML Code Fixed

  1 comment for “Sharepoint 2013 Assigned to Field Showing HTML Code

  1. November 26, 2014 at 12:51 pm

    Hi, thanks for mentioning me!

    That’s weird, because SP 2010 uses the same DOCTYPE as 2013..

    Anyway, I will update my entry!

    Have a great day,
    Rudi

Leave a Reply

Your email address will not be published. Required fields are marked *