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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -