1

We have installed a fresh instance of 9.3 and moved the data from 8.2, via packages.
For page items, there is a multi-line field for meta tags and the values are included separated by new-lines. However, when it is rendered, it's adding <br> tags.

In the field:

 <meta property="og:locale" content="ja_JP" />
 <meta property="og:type" content="article" />

In the page source:

<meta property="og:locale" content="ja_JP" /><br/><meta property="og:type" content="article" />

Maybe for this reason, all these meta tags are rendered inside the <body> instead of the <head>.

When I view the source in the browser, the meta tags are still inside the <head> tag, but they have those <br> tags.

In the browser:

enter image description here

Has anything changed in 9.3 for a multiline field that is is adding these tags automatically?

1

Some 8 versions (and 8.2 was one of them) had a bug: line breaks in multi-line fields were not rendered as <br/> tags on a page although they should. You can read about the bug here: https://blog.krusen.dk/sitecore-mvc-multi-line-field-bug/

So by moving towards Sitecore 9.3, you now have a version without that bug and you do get the br tags.

You could either remove all the line breaks. Or try to output the multiline as raw value (not rendered).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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