Jump to content

$amp; changes back to & ..?


yoshida
 Share

Recommended Posts

Hey guys.I've been working really hard to change my site to valid xhtml (transitional 1.0). Some of you might've read about my misfortunes and my inability to cope with it like a pro. The biggest pain was changing links where more than one variable was propagated (a href="index.php?variable1=value1&variable2=value2").The xhtml validator complained about the & causing unexpected results in obscure situations, and recommended changing & to &So I did, using the content manager (stuff like newspages, the menu, the css and the head are stored in a mysql db, so a content manager is a comodity and not a burden). Freaky stuff is, when I adapt the links to valid xhtml and save the page, it seems like it gets rid off the 'amp;' bit. Does the parser remove the ';' character from non-php content? If so, how can I fix this? (addslashes/stripslashes?)Right now I'm too confused about other stuff to do tedious sessions of T&A (that's trial&error you perverted bastards :) ) so that's why I have to fall back to your experience for my sanity's sake.So yeah, help appreciated. Happy holidays.

Link to comment
Share on other sites

  • 2 weeks later...

It almost sounds like a problem with the content management system. It might be converting the HTML entities to characters. There is a function called html_entity_decode that will convert HTML entities to characters. But PHP would not automatically do things like this. A programmer would hardly ever want the language to do automatic conversion on their data, typically you have your data exactly the way you want it.

tedious sessions of T&A (that's trial&error you perverted bastards)
Wouldn't that be T&E?
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...