#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,657
    Rep Power
    171

    & did not start a character reference. (& probably should have be ....


    Hello;

    Why do I get this error?
    & did not start a character reference. (& probably should have been escaped as &.)
    This is the form:
    Code:
    <form action="/detail_nd.php?hid=1880&children=0&adults=1&checkin=2013-03-01&nights=1&gal=1&search_id=19&search_type=destination" method="post">
    Thanks
    Last edited by requinix; March 5th, 2013 at 08:44 PM.
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,054
    Rep Power
    9398
    Don't mind the forum software.

    In HTML anywhere you want to put a literal ampersand you actually "need" to entity-encode it. That includes inside tag attributes.
    Code:
    <form action="/detail_nd.php?hid=1880&amp;#38;amp;children=0&amp;#38;amp;adults=1&amp;#38;amp;checkin=2013-03-01&amp;#38;amp;nights=1&amp;#38;amp;gal=1&amp;#38;amp;search_id=19&amp;#38;amp;search_type=destination" method="post">
    But practically nobody actually does that. It's not that big of a rule.
  4. #3
  5. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,126
    Rep Power
    4304
    Originally Posted by requinix
    But practically nobody actually does that. It's not that big of a rule.
    Yes, as far as HTML errors go, it is one of the more minor ones and browsers handle it fairly well and consistently, but I don't see how that's a good excuse for what boils down to inattention to detail.

    Comments on this post

    • requinix agrees : you're right, I shouldn't just brush it off
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo