NYCPHP Meetup

NYPHP.org

[nycphp-talk] Code review

Paul Reinheimer preinheimer at gmail.com
Mon Jun 6 10:41:09 EDT 2005


I stand corrected, thanks!



An entity reference was found in the document, but there is no
reference by that name defined. Often this is caused by misspelling
the reference name, unencoded ampersands, or by leaving off the
trailing semicolon (;). The most common cause of this error is
unencoded ampersands in URLs as described by the WDG in "Ampersands in
URLs".

Entity references start with an ampersand (&) and end with a semicolon
(;). If you want to use a literal ampersand in your document you must
encode it as "&" (even inside URLs!). Be careful to end entity
references with a semicolon or your entity reference may get
interpreted in connection with the following text. Also keep in mind
that named entity references are case-sensitive; &Aelig; and æ
are different characters.

Note that in most documents, errors related to entity references will
trigger up to 5 separate messages from the Validator. Usually these
will all disappear when the original problem is fixed.



paul


On 6/6/05, csnyder <chsnyder at gmail.com> wrote:
> On 6/5/05, Paul Reinheimer <preinheimer at gmail.com> wrote:
> 
> > 1. In several places you echo out links to the user agent, but encode the
> > ampersand, I don't think you need to do this, since you are using it as
> > a seperator, not a charecter (or such is my understanding).
> 
> > href="/anp/auth_man.php?event=doQueryLogin&amp;loginAgent=[...]"
> 
> Using &amp; as a separator in output URLs is required if the output is
> XHTML, because an ampersand by itself is not an allowed entity. So the
> above snippet is fine.
> 
> --
> Chris Snyder
> http://chxo.com/
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
> 


-- 
Paul Reinheimer
Zend Certified Engineer



More information about the talk mailing list