XHTML 1.0 Strict

 

I want to have my EPiServer site comply with the XHTML 1.0 Strict standard but EPiServer produces some JavaScript which is invalid. According to an XHTML validator (http://validator.w3.org/check) the following JavaScript line (produced by EPiServer) does not comply with the standard:

menu1.AddMenuItem('Hurtigrediger',null,'window.open(\'http://localhost/mysite/UI/edit/Default.aspx?id=3&epslanguage=da&mode=simpleeditmode\',\'_self\')','true','/mysite/App_Themes/Default/Images/Tools/QuickEdit.gif',null);

The JavaScript block generated by EPiServer is parsed by the validator because it is not marked as 'CDATA' (see http://javascript.about.com/library/blxhtml.htm), and so the use of ampersands is wrong - they should have been replaced by '&' according to the standard.

So is there some way that I can either make EPiServer replace the ampersands, or make EPiServer mark the javascript as 'CDATA'?

#27951 Feb 14, 2009 12:15
  •  

    Hi Søren!

    Try to validate the page as a visitor (not logged in) to get a realistic result with less interferance from EPiServer's On Page Edit feature.

    Also try to inherit from SimplePage instead of TemplatePage to turn off some EPiServer features.

    #27961 Feb 15, 2009 14:48
  • Member since: 2003
     

    Another thing to do in web.config under the <system.web> section: 

    <xhtmlConformance mode="Strict" />

    One of the things that this declaration do is make the form tag validate correctly.

    /Hans

    #27969 Edited, Feb 16, 2009 11:47