1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

& and Validations

Discussion in 'HTML, Graphics & Programming' started by dmce, 23 Jan 2006.

  1. dmce

    Gangster

    Joined: 18 Oct 2002

    Posts: 249

    Location: Glasgow

    Hi

    I am reading in a txt file using PHP (displaying my audioscrobbler data until i get round to using XML) and it happend to have an & in it which is plonked into my html. It causes havoc with validation especially CSS where it breaks it. Any suggestions for getting round this.

    Site is www.dmce.co.uk
     
  2. Augmented

    Soldato

    Joined: 18 Oct 2002

    Posts: 5,464

    Location: London Town

  3. Berserker

    Man of Honour

    Joined: 4 Nov 2002

    Posts: 15,441

    Location: West Berkshire

    What he said, and it's not just & that causes this problem. :)
     
  4. dmce

    Gangster

    Joined: 18 Oct 2002

    Posts: 249

    Location: Glasgow

    Thanks. htmlspecialchars() done the trick in this case but now i am aware of soving the issue.

    Helpful as usual :)