4.3.10 inserting code invalid HTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James

    4.3.10 inserting code invalid HTML


    I am in the process of running my site through WC3 validation. I
    assume the validator at www.w3c.org cant accept cookies and so PHP is
    attaching &PHPSESSID=lask lijasj09jsad (or similar) to my URLS. The
    problem is the leading character is a literal & rather than a & and
    this is stopping the validator telling me my pages are valid.

    What do I do here --

  • Alvaro G. Vicario

    #2
    Re: 4.3.10 inserting code invalid HTML

    *** James escribió/wrote (21 Mar 2005 11:07:38 -0800):[color=blue]
    > I am in the process of running my site through WC3 validation. I
    > assume the validator at www.w3c.org cant accept cookies and so PHP is
    > attaching &PHPSESSID=lask lijasj09jsad (or similar) to my URLS. The
    > problem is the leading character is a literal & rather than a & and
    > this is stopping the validator telling me my pages are valid.[/color]

    You said it all: you cannot insert a literal &. It's the same as inserting
    a literal \ in a PHP string: you must escape it. Use & instead.


    BTW, W3c Validator won't use cookies. Why and how?


    --
    -+ Álvaro G. Vicario - Burgos, Spain
    +- http://www.demogracia.com (la web de humor barnizada para la intemperie)
    ++ No envíes tu dudas a mi correo, publícalas en el grupo
    -+ Do not send me your questions, post them to the group
    --

    Comment

    • Gordon Burditt

      #3
      Re: 4.3.10 inserting code invalid HTML

      >*** James escribió/wrote (21 Mar 2005 11:07:38 -0800):[color=blue][color=green]
      >> I am in the process of running my site through WC3 validation. I
      >> assume the validator at www.w3c.org cant accept cookies and so PHP is
      >> attaching &PHPSESSID=lask lijasj09jsad (or similar) to my URLS. The
      >> problem is the leading character is a literal & rather than a & and
      >> this is stopping the validator telling me my pages are valid.[/color]
      >
      >You said it all: you cannot insert a literal &.[/color]

      PHP is inserting a literal &.
      [color=blue]
      >It's the same as inserting
      >a literal \ in a PHP string: you must escape it.[/color]

      How? It appears that the & is being added through the action of trans_sid.
      [color=blue]
      >Use & instead.[/color]

      How?

      Gordon L. Burditt

      Comment

      • Alvaro G. Vicario

        #4
        Re: 4.3.10 inserting code invalid HTML

        *** Gordon Burditt escribió/wrote (21 Mar 2005 21:16:16 GMT):[color=blue][color=green]
        >>Use & instead.[/color]
        >
        > How?[/color]

        Sorry, I misunderstood you. Check this:





        --
        -+ Álvaro G. Vicario - Burgos, Spain
        +- http://www.demogracia.com (la web de humor barnizada para la intemperie)
        ++ No envíes tu dudas a mi correo, publícalas en el grupo
        -+ Do not send me your questions, post them to the group
        --

        Comment

        Working...