0
votes

In SharePoint 2010 we had a custom field from Pentalogic that was basically a version of the calculated field that allowed the rendering of HTML on the view. After migrating the site collection to a SharePoint 2013 environment, the field is displaying the HTML instead of rendering it.

While migrating the site collection, we did not upgrade the layout, so it's still using the SharePoint 2010 look and feel. The custom field has of course been deployed to the 2013 environment using "-compatibility all".

The display template for the field:

<RenderPattern Name="DisplayPattern">
  <Column UseRelatedField="TRUE" HTMLEncode="FALSE" />
</RenderPattern>

It seems like SharePoint is ignoring the HTMLEncode attribute.

So my questions:

  • Is there a way to make SharePoint 2013 enforce the HTMLEncode attribute?
  • Is it possible to use JSLink in 2010-UI-mode? In that case we can replace the Pentalogic field by the OOB calculated column and use JSLink for rendering the HTML. I've already tried this approach without success, but as I'm new to JSLink I may have made a mistake. I based myself on this post: http://blog.pathtosharepoint.com/2013/06/19/html-calculated-column-client-side-rendering/
  • If none of the above is possible, what would be the best way to accomplish similar functionality? The field is mainly used for conditional formatting in list views.
1
Since 2010, A default Calculated Column set to datatype=Number also renders as HTML viewmaster365.com/#/HowDanny '365CSI' Engelman

1 Answers

0
votes

I found the solution. The HTMLEncode attribute should be omitted, then it works. So the display template becomes:

<RenderPattern Name="DisplayPattern">
  <Column UseRelatedField="TRUE" />
</RenderPattern>