When having just upgraded our old 6.x Sitecore solutions to 8, some content seem to be broken because html tags are getting rendered on pages.

But this problem was not there in Sitecore 6.x version. How to resolve this? I have tried to test it on multiple browser versions.

We have recently migrated our one of application from version 6 to version 8 and we are facing some issue. Here I am trying to get solution for one problem.

Content seem to be broken on pages as html tags start being rendered on pages. We have not made any changes in content and it was working fine in previous version.

What can be the possible reason?

1 Answer 1


This must be related to your field type. If you have HTML tags saved in Single-Line Text or Multi-line text field then it is expected behavior as the both Single-Line Text and Multi-Line are not supposed to contain any HTML tags in this version.

Text fields are not supposed to contain any HTML tags, but the Rich-Text Field is.

Another way we have tried to solve this problem is by extending the Sitecore RenderField pipeline.

 public void Process(RenderFieldArgs args) 
  Assert.ArgumentNotNull((object)args, "args"); 
  string fieldTypeKey = args.FieldTypeKey; 
  if (fieldTypeKey != "text" && fieldTypeKey != "single-line text") 
  { return;  } 

  args.Result.FirstPart = HttpUtility.HtmlDecode(args.Result.FirstPart); 

You can use either way whichever works for you.

  • Thanks it did the trick. I have changed the type for one field and tested and it worked. Second one can be time consuming but I guess, I can live with first solution. Thanks Aug 19, 2017 at 11:56
  • Hi Rohit, For me args.FieldTypeKey always retrun rich text .No other filed type key (like "single-line text") returns , sny specific reason ?
    – Singh
    Mar 6, 2023 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.