Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Invalid characters in URLs

Trying to create sitemap generator



8:44 am on Apr 30, 2007 (gmt 0)

10+ Year Member

Hey all,

Another invalid character question!

I'm trying to develop my own sitemap generator. If I have a ΒΌ (1 quarter) symbol in the URL to be generated, I need to convert the symbol to a URL friendly equivalent. Previously, the 3rd part sitemap generator converted this symbol to ¼ yet I can only convert to ¼ using htmlspecialchars/htmlentities which Google rejects.

Any idea how to convert to the correct format?

Many thanks


8:57 am on Apr 30, 2007 (gmt 0)

5+ Year Member

Hi Karma,

Not sure how you're creating the string but couldn't you do a str_replace on the string?



9:05 am on Apr 30, 2007 (gmt 0)

10+ Year Member


I could, but I need to convert any invalid character to that 'version' character code, or any URL friendly format.



Featured Threads

Hot Threads This Week

Hot Threads This Month