php - Standard encoding for urls for Sitemap -


this question exact duplicate of:

i want submit sitemap google, don't want mess up. having trouble urls submit; of them have special characters in them such ampersand (&) symbol , parenthesis (). want know correct way handle them?

i using php's urlencode(), turns them in %28, %29 , on doesn't , scared if give google links , go on index them index them as

domain.com/blabla%28blabla.html 

rather than

domain.com/blabla&blabla.html 

are generating xml hand? please consider using php dom classes instead.

you'll want encode ampersands &, etc., it's best let library emit well-formed xml you.

see generating xml document in php (escape characters) more discussion of this.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -