Jump to content
xisto Community
Sign in to follow this  
matak

Xhtml Strict Links Tip A problem might accure

Recommended Posts

If you try to put a link that has an & in your xHTML strict page, you need to change & to & in order for the page to be xHTML Strict..

 

eg..

 

BAD LINK:

http://jasamza.korisnik.com/forums/viewtopic.php?f=19&t=7&sid=6c2e9120dcff6e0b83698c4aa7be929a
GOOD LINK:
http://jasamza.korisnik.com/forums/viewtopic.php?f=19&t=7&sid=6c2e9120dcff6e0b83698c4aa7be929a

copy pasted &
Edited by matak (see edit history)

Share this post


Link to post
Share on other sites

I'm sorry I must be missing something, I don't see any difference between the two? it may be because of the browsers but idk.

Share this post


Link to post
Share on other sites

um... hey matak, i don't see any difference in the two sample links. and by & you mean the html code for ampersand. am i correct?testing.... \&testing again.... &

Edited by master_bacarra (see edit history)

Share this post


Link to post
Share on other sites

But there is a problem to this though, although I think some php scripts fixed this, anyways, if your using php scripts that generate links and use them on your xhtml 1.0 strict page your going to come up with an error with the use of & and not coding it as such. also all xhtml validates that as an error if you use & instead of it's code when producing links, again if you code your php script properly then you won't have to worry about that error showing up.

Share this post


Link to post
Share on other sites

@SM, you might provide explanation to how to avoid this error with PHP. urlencode() didn't work right for me. i read on w3 standards but it seems like you have to modify php.ini in order to avoid errors with these kind of links.maybe just using preg_replace on your link generator script would be a good solution...

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.