SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: validation

  1. #1
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    validation

    Ok... I'm going for the validation on w3.org [img]images/smilies/rolleyes.gif[/img]

    Finally.. [img]images/smilies/wink.gif[/img]

    first I don't really know what version of html to pick .. but after reading through the site i decided to go for the 4.0 loose (strict is just to much of a culture shock to me [img]images/smilies/xeye.gif[/img] :lol[img]images/smilies/smile.gif[/img]

    I'm getting the hang of it and mostly am removing a lot of attributes that have no meaning (like both declaring a height in the table in the tr and in the td ) so I fixed those ...

    But I keep getting these weird errors ..

    <LI>Line 61, column 126: cannot generate system identifier for general entity "show" <LI>Line 61, column 136: cannot generate system identifier for general entity "PHPSESSID"
    and also

    column 135: entity was defined here ..."color:black" href="""/?cat=1&show=home&PHPSESSID=c6635d9eecdde72c3034fe9be98a3

    Why can't i just use the ?cat=1 or whould i use index.php?cat=1 ??? if yes then why????

    Please help

    thanks
    Peanuts
    the neigbours (free) WIFI makes it just a little more fun

  2. #2
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by peanuts
    Why can't i just use the ?cat=1 or whould i use index.php?cat=1 ??? if yes then why????
    Using href="?cat=1" or href="index.php?cat=1" should validate fine, but it looks like you have some ampersands in there.

    Certain characters have to be escaped into entities:

    < &lt;
    > &gt;
    & &amp;
    " &quot;

    Try this: Instead of href="?cat=1&show=home&PHPSESSID=c6635d9eecdde72c3034fe9be98a3" type href="?cat=1&amp;show=home&amp;PHPSESSID=c6635d9eecdde72c3034fe9be98a3"

    Blech, on a website I did, the site wasn't validating because visitors, in their entries, were typing in " instead of &quot; and links such as href="story.php?p=1&c=1" instead of a href="story.php?p=1&amp;c=1" . Once I went in to edit those entries, everything validated fine.

    Someone can explain better than me prolly, but it has to do with the these characters used in markup/programming languages and so, when the browser encounters these characters, it then looks for variables or attributes or etc instead of content text.
    Last edited by CRA; Jul 29, 2003 at 08:25.

  3. #3
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    You mean I actually have to go and change all my & 's to &amp; in all my php generated links...



    Well I can get that since & starts special characters ... but so far haven't found a browser that doesn't understand...

    ahwell ... I think I'll better start my search and replace then

    Thanks.. so fare

    Peanuts
    the neigbours (free) WIFI makes it just a little more fun

  4. #4
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by peanuts
    You mean I actually have to go and change all my & 's to &amp; in all my php generated links...

    images/smilies/bawling.gifimages/smilies/bawling.gifimages/smilies/bawling.gifimages/smilies/xeye.gifimages/smilies/bawling.gif

    Well I can get that since & starts special characters ... but so far haven't found a browser that doesn't understand...
    Blech. I know. I personally wouldn't have cared and wouldn't have done anything since yeah, everything worked in the browser. But the RSS feed on my site wasn't working until I edited all those entries and mucked through all that php to change the links -- nevermind that I don't have a clue for php. But it works now.

  5. #5
    SitePoint Enthusiast m0n5t3r's Avatar
    Join Date
    Jul 2003
    Location
    Romania
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is that & is not a valid HTML character, you should use either &amp; or & #38 (without the space ) or &#x26; instead...

  6. #6
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh cool, I didn't know there were other ways to escape the ampersand. Is there a chart out there?

    But me personally, I just use &amp; &quot; &lt; &gt; 'cause since I started defining my site's charset in utf-8, I haven't needed to escape anything besides those characters.

  7. #7
    SitePoint Enthusiast m0n5t3r's Avatar
    Join Date
    Jul 2003
    Location
    Romania
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CRA
    Oh cool, I didn't know there were other ways to escape the ampersand. Is there a chart out there?

    But me personally, I just use &amp; &quot; &lt; &gt; 'cause since I started defining my site's charset in utf-8, I haven't needed to escape anything besides those characters.
    I am sorry, but I've started writing the answer about an hour ago, when there were no answers, but I got involved with some other stuff, so please don't take it personally

  8. #8
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by m0n5t3r
    I am sorry, but I've started writing the answer about an hour ago, when there were no answers, but I got involved with some other stuff, so please don't take it personally
    No offense taken, don't worry about it. I think it's cool you know all those ways to escape the ampersand. Me, I'm just lazy, hee.

  9. #9
    SitePoint Member mcintyrc's Avatar
    Join Date
    Dec 2002
    Location
    Lafayette, IN
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is a good list of common used special characters and such:

    http://hotwired.lycos.com/webmonkey/...al_characters/
    Thanks -- Chris
    Get Funny T-Shirts and Custom Printed T-Shirts @ ShirtsByMail.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •