Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by
I’m using the “Include <meta> description for home page:” field in Admin > Layout. My description includes line breaks and emphasis HTML for the homepage presentation. How do I omit this formatting from the meta description?

My theme is TwentyTwelve. The website is http://fontid.co/
Q2A version: 1.7

1 Answer

+1 vote

I've just seen what you mean. The thing is that you got the meta tag wrong. You should not add those characters in there. Just add a single line that describes the page and do not try to add more HTML tags in the string. They make no sense and they end up being HTML encoded for safety purposes.

This means you can input "Love & Peace" but the resulting string will be "Love &amp; Peace". This is the expected behaviour. But you should not input "Hi <strong>there</strong>" because HTML tags are not permitted so they will be HTML encoded and result in "Hi &lt;strong&gt;there&lt;/strong&gt;", which is also the expected behaviour.

Yes, the reason for the formatting is that I’m using the Layout feature which puts the text in both the header of the site and in the meta tag. I want to format the text for the header but not the meta tag. Obviously I should separate these two things — I was just using the Layout shortcut because it was quicker.