We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37073
    • 12 Posts
    Hello All,

    I get following two kinds errors on trying html validation. Any suggesstion?


    character "&" is the first character of a delimiter but occurred as data

    xmlParseEntityRef: no name

    Thnx
    Sintl


      • 3109 ☆ A M B ☆
      • 894 Posts
      convert all your & to & in your html that should take care of it.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        If the & is part of some Javascript code, you cannot change it to &. There are two solutions in this case. One is to surround your Javascript code with CDATA tags:
        <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
        ...
        // ]]></script>
        

        The other solution is to put the javascript code in an external file and load that file in your script tags:
        <script type="text/javascript" src="url-to-the-file.js"></script>
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org