main banner

Content Management

Multi-Line text field ignores new lines

Probably your site is going crazy, it’s wrongly displaying multi-line text fields and you’re asking yourself, who stole my new lines? Well this issue could be related to Sitecore upgrades.

Recently, I read a post regarding a small, but important, change at FieldRenderer that might impact page’s presentation when Sitecore is upgraded from 6.2 to 6.3...  

Sitecore 6.3 removed the new-line character from Multi-Line text fields. This change might impact your page if you’re using the ‘\n’ char replacing it by ‘<br />’ tags or using it to split the text in an array of lines.  

If you need to work with the new line char, you can get it using raw value of the field’s Value, which is still containing the ‘\n’ char. Remember the char is removed by FieldRenderer.

More details at the original post.


Luis G.

An expert we all come to when in doubt, Luis was born in Monterrey and has a B.S. Electronic Systems Engineering degree His multiple abilities are backed 10 years of experience in .NET, SQL and recently joined the ranks of front end developers. A Star Wars and Lego enthusiast, he is also a loving father and a very friendly co-worker who writes for the Inflection Point’s blog with lots of inspiration and fills our blog with descriptions of our work environment that recall us all of the good times.

Articles