php - Standard encoding for urls for Sitemap -
this question exact duplicate of:
- sitemap urls special characters [closed] 6 answers
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
Post a Comment