Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sitecore FieldRenderer output differences between CMS 6.5 and 7.0

Tags:

I've recently been moving content and codebase from an old Sitecore CMS 6.5 installation (with quite a number of customisations) to a clean installation of CMS 7.0.

In the original site a Single-line text field had been used to render arbitrary Javascript into the page (for tracking). This worked fine and the Javascript was rendered into the page, unencoded and executed as expected.

However in the new installation I have noticed that the content is now HTML encoded, which means that it does not execute under the Sitecore 7 installation I am working with.

In my Sublayout I have a FieldRenderer like this:

<sc:FieldRenderer ID="tracker" FieldName="Script" runat="server" />

I'm not sure if there is a customisation / config that I have not migrated across, or if this is a change which has been introduced in Sitecore 7 (possibly for secuity reasons).

Can anyone shed any light on this? Do I need to create my own field type to allow the desired behaviour, or is there a way I can do this with 'out of the box' field types?