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

    I wanted to use wayfinder 2.0 for a web pages for my customers but when I validate (http://validator.w3.org) a site or page including http://www.muddydogpaws.com/ I see error messages like this:


    Line 48, Column 19: character "&" is the first character of a delimiter but occurred as data.
    if (!o && d.getElementById) o=d.getElementById(id);✉
    This message may appear in several cases:

    You tried to include the "<" character in your page: you should escape it as "&lt;"
    You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
    Another possibility is that you forgot to close quotes in a previous tag.



    How could I solve this problem?

    The code in my page for Wayfinder Menu is:

    [[Wayfinder?startId=`0` &outerTpl=`mh.OuterTpl` &innerTpl=`mh.InnerTpl` &rowTpl=`mh.RowTpl` &innerRowTpl=`mh.InnerRowTpl` &firstClass=`first` &hereClass=``]]

    Your feedback would be appreciated.

    Regards,

    Martin
      • 7231
      • 4,205 Posts
      I think that there is an option in the ’site settings’ (in the manager) to resolve this. Another option is to use the escaped version in the document tile itself rather than the &.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 10449
        • 956 Posts
        I don’t think it has to do anything with Wayfinder per se. The error msg from the validator is pointing out strange characters in your JS file. WF doesn’t add JS on its own.
        Maybe post the URL?
          • 18489
          • 7 Posts
          Hello,

          Try validating http://www.muddydogpaws.com/

          You will see:
          Failed validation, 14 Errors

          Errors are like this:

          Line 49, Column 19: character "&" is the first character of a delimiter but occurred as data.
          if (!o && d.getElementById) o=d.getElementById(id);✉
          This message may appear in several cases:

          You tried to include the "<" character in your page: you should escape it as "&lt;"
          You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
          Another possibility is that you forgot to close quotes in a previous tag.

          How can this errors be cleaned?

          It seems that are related to Javascript code used like drop_down_menu.js (used in ModxHost template).

          Regards,

          Martin

            • 10449
            • 956 Posts
            No. If you view source, you’ll see that it’s the WebLogin JS. If you’re using XHTML doctype, you should wrap inline JS inside CDATA tags: http://en.wikipedia.org/wiki/CDATA
              • 7231
              • 4,205 Posts
              I get the same error with a wayfinder menu without any JS attached. I am only able to resolve it by using &amp; in the document title within ModX, which is not very nice since the doc name ends up being unreadable to the normal user ’Faculty &amp; Staff’.

              Line 51, Column 55: character "&" is the first character of a delimiter but occurred as data.
              <li><a href="/index.php?id=4" title="Faculty & Staff" >Faculty & Staff</a></li>

              This message may appear in several cases:
              * You tried to include the "<" character in your page: you should escape it as "&lt;"
              * You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
              * Another possibility is that you forgot to close quotes in a previous tag.

              I would expect that Modx (not wayfinder) would encode the title correctly, meaning that if I entered a & that it would record a &amp; so that the document titles could use special characters. At least in utf8 it does not seem to work that way.
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don&#39;t know what it is.
                Do you, Mr. Jones? - [bob dylan]