Collected BNF for URI. PHP's urlencode function escapes more than is necessary specifically for the path component of a URL. So things like the colon get escaped when they don't have to be:
http://keithdevens.com/weblog/archive/2005/Oct/19/James-4%3A13-17
http://keithdevens.com/weblog/archive/2005/Oct/19/James-4:13-17
Gonna write my own escaper based on the BNF that just works for paths so that my slugs won't be so ugly when they contain characters that are invalid in certain components of the URL, but not the path.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):