Glass, ForceRenderField, and the RenderField pipeline

I was recently doing some token replacement of field values using a processor that I was adding to the RenderField pipeline. The problem was, it wasn’t running in Glass. Debugging in Visual Studio, the pipeline was never hit. Standard Sitecore rendering of the field was fine, but Glass – nope. Continue reading “Glass, ForceRenderField, and the RenderField pipeline”

Advertisement
Glass, ForceRenderField, and the RenderField pipeline

Fix HTML tags in Single-line or Multi-line text fields

Between Sitecore 6.5 and Sitecore 6.6 Sitecore changed the way that Text Fields are rendered.They changed it so that text fields output was HTML Encoded. This is technically correct, and it’d be fair to call this a bug fix. It’s much safer to prevent users injecting HTML.

However, this is a problem for systems where users have put HTML content into those text fields, especially where you have thousands and thousands of pages.

For example, in a widget:
Example in a Sublayout

Or in a footer:
Example in Footer

Identifying where those fields contain such values could be … challenging. Instead, Martin English has written a nice processor for the RenderFields pipeline that should restore the old unencoded HTML output.

Fix HTML tags in Single-line or Multi-line text fields