SF 4.1: Double quotes cannot be used in page description - throws 'The server block is not well formed' exception
See attached image for exact exception. The exception was traced to the page description having double quotes within the text which apparently breaks Sitefinity 4.1
Stay "tuned-in" to the...
Stay 'tuned-in' to the...
Pavel, I'm pretty sure you'll get this with any asp.net server control. If you want to use double quotes for content then you need to use single quotes for your tag.
The following is a simple example that would cause the exact same problem on a standard asp.net page.
NOT OK:
<asp:Label ID="1" runat="server" Text="Test "my" text" />
OK:
<asp:Label ID="1" runat="server" Text='Test "my" text' />
Notice the change to using single quotes after Text= Try this and you should be ok.
Cheers,
Phill
The issue is that Sitefinity renders the content for the Meta Description unescaped - the <meta> tag is not created by me either in page or code... In this particular case the Meta Description is a page property that a SF can enter freely in the admin UI and SF4.1 does not handle well the double quotes.
Gotcha, I thought the screen grab was from a Master Page/Template you had created. I now see how this is indeed another SF bug. So then I guess my response of basic .net programming should be directed to Sitefinity devs and not you ;)
Cheers,
Phill
Hi,
Can you try escaping the quotes - "Stay "tuned-in" to the..". Indeed there is an issue, because we do not escape them and this is something that we have to fix.
Greetings,
Ivan Dimitrov
the Telerik team
I see that also SF 4.4 doesn't escape them. Please let me know if I'm wrong.
This is still an issue in SF 5.0
Has anyone found a workaround or fix for this?
There isn't a fix for it but you can remove the special character from the keywords and description fields on a page's properties. I've included a screenshot of the fields I am talking about. Here is a PITS support created when I submitted this as an issue.