supergrover1981 Posted December 12, 2006 Share Posted December 12, 2006 Hi Gang,I'm currently trying to clean up my webpage code and for the most part it's going well - there's only one small problem:Many parts of my site link to external URLS with long "$_GET"-inspired addresses. (For example, "http://www.example.com/abc.php?id=xyz&itemid=frog"The problem is that W3C validation throws up a red flag whenever it sees a "field=xyz" part of a url, giving the messages: general entity "field" not defined and no default entity.every time it stumbles across an ampersand in the URL and:reference to entity "field" for which no system identifier could be generated.every time it stumbles across an equals sign.I'm *sure* there must be some way around this - surely W3C can acknowledge _GET URLS somehow? If anyone can offer any suggestions I'd be very appreciative.Many thanks, - SuperGrover :-) Link to comment Share on other sites More sharing options...
jlhaslip Posted December 12, 2006 Share Posted December 12, 2006 Replace the "&"s with the html entity for an Ampersand: & Link to comment Share on other sites More sharing options...
supergrover1981 Posted December 12, 2006 Author Share Posted December 12, 2006 Replace the "&"s with the html entity for an Ampersand:& *grin*Many thanks jlhaslip - worked a treat. The URLs were PHP-driven which was kinda confusing me, but a str_replace('&', '&', $template_row['fromurl']) did the trick. :-) Link to comment Share on other sites More sharing options...
jlhaslip Posted December 12, 2006 Share Posted December 12, 2006 Glad to help.This is a perfect example of the nature of compounding errors inside the validator. Solve the ampersand problem and the equal-sign error goes away. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now