+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / SF 4.1: Double quotes cannot be used in page description - throws 'The server block is not well formed' exception

SF 4.1: Double quotes cannot be used in page description - throws 'The server block is not well formed' exception

9 posts, 0 answered
  1. Pavel
    Pavel avatar
    14 posts
    Registered:
    25 Sep 2007
    20 Apr 2011
    Link to this post
    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...

    Note that this exception is not related to the one posted in the forums related to maximum length.

    If text is changed to single quote everything works fine.
    Stay 'tuned-in' to the...

    Please resolve asap.
  2. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    20 Apr 2011
    Link to this post
    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
  3. Pavel
    Pavel avatar
    14 posts
    Registered:
    25 Sep 2007
    20 Apr 2011
    Link to this post
    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.
  4. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    20 Apr 2011
    Link to this post
    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
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    26 Apr 2011
    Link to this post
    Hi,

    Can you try escaping the quotes - "Stay &quot;tuned-in&quot; 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

  6. Ryan
    Ryan avatar
    8 posts
    Registered:
    16 Jul 2012
    08 Jun 2012
    Link to this post
    I see that also SF 4.4 doesn't escape them. Please let me know if I'm wrong.
  7. Brett Whittington
    Brett Whittington avatar
    89 posts
    Registered:
    10 Aug 2012
    14 Feb 2013
    Link to this post
    This is still an issue in SF 5.0
  8. Hans
    Hans avatar
    1 posts
    Registered:
    18 Dec 2012
    13 May 2013
    Link to this post
    Has anyone found a workaround or fix for this?
  9. Brett Whittington
    Brett Whittington avatar
    33 posts
    Registered:
    12 Jan 2012
    13 May 2013 in reply to Hans
    Link to this post
    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.
9 posts, 0 answered