KBD

Keith Devens .com

Friday, July 4, 2008 Flag waving
Don't panic. – Douglas Adams (The Hitchhiker's Guide to the Galaxy)
← Saddam's TrialABC News: 'The Simpsons' Exported to Middle East -- Minus Bacon, Beer →

Daily link icon Wednesday, October 19, 2005

Collected BNF for URI

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.

← Saddam's TrialABC News: 'The Simpsons' Exported to Middle East -- Minus Bacon, Beer →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

July 2008
SunMonTueWedThuFriSat
 12345
6789101112
13141516171819
20212223242526
2728293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 5 posts

Recent comments XML

Girls, please don't get breast implants

> And no, you will not be receiving​a picture.

:-(...

Keith: Jul 2, 6:05am

Javascript clone function

This is a clever way to clone an​object if you are using YAHOO UI.​Same tec...

Antonio: Jul 1, 12:47pm

I hate Norton Antivirus

Oh just one other thing norton is​great at keeping people out of your​compu...

kevin.sands: Jul 1, 12:50am

Terminator 3 was awful

I think the biggest reason why T3​totally blew was because Edward​Furlong g...

76.167.172.64: Jun 29, 3:06am

Generated in about 0.132s.

(Used 8 db queries)

mobile phone