Validation Errors

Discussion in 'Web Design & Coding' started by ~bk, Feb 20, 2006.

  1. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    Getting these two errors. Happened after I installed a poll plugin.

    Any ideas?
     
  2. Kush

    Kush High On Life!

    Messages:
    4,590
    Location:
    Montreal, Quebec
    are they spaces when they shouldnt be between the p and the h? well all of them actually
     
  3. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    No, I don't think so. I guess it's somewhere in the plugins file. Looking for it.
     
  4. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    When you open up the source file, look for the "&" symbol before the PHPSESSID variable in the URL.
    Change that "&" to "&" (without the quotes). That should fix it. :)
     
  5. Kush

    Kush High On Life!

    Messages:
    4,590
    Location:
    Montreal, Quebec
    see, i told net to say that because i didnt want to take all the credit :p
     
  6. ~bk

    ~bk I Political User

    Messages:
    3,768
    Location:
    Canada
    The "&" is in the ID of the poll. And in the plugin it's written as <?php echo $poll_question->id; ?>. So I can't really change it. :ermm: I searched through the plugin file to see if I can edit that but I couldn't.

    Have asked the author of the plugin too. Let's see.
     
    Last edited: Feb 20, 2006
  7. albybum

    albybum Penguin Rancher

    Messages:
    280
    Location:
    Elizabethton, TN
    You might be able to do something like this, but it would assume there are no previous instances of ISO character codes like &amp; or &nbsp;

    PHP:

      $contents 
    $poll_question->id;
      
    $search_pattern = array('&'); 
      
    $replace_with = array("&amp;"); 
      
    $contents=str_replace($search_pattern,$replace_with$contents); 
      echo 
    $contents;