Re: draft-duerst-mailto-bis-05: Detailed review of '@' and '+'

I realize the following is malformed and invalid abnf, but I wish the spec showed *something* like this.

mailtoURI   = "mailto:" [ to-hfvalue ] [ hfields ]
hfields     = "?" hfield *( "&" hfield )
hfield      = hfname "=" hfvalue

to-hfvalue  = pct-encoded-value with  %0D and %0A stripped
; (That becomes value of the To: field/header
; after it's percent-decoded)
; (equivalent to mailto:?to= except for in form submission)

hfname      = NON-EMPTY, UNIQUE, LOWERCASE pct-encoded-value
; (matching and uniqueness is case-insensitive
; , which also means that you can have both ?to=
; and a to-hfvalue)

hfvalue     = NON-EMPTY pct-encoded-value

pct-encoded-value = no-encode / pct-encode / unsafe-hh

no-encode     "A" / "B" / "C" / "D" / "E" / "F" / "G" / 
              "H" / "I" / "J" / "K" / "L" / "M" / "N" / 
              "O" / "P" / "Q" / "R" / "S" / "T" / "U" / 
              "V" / "W" / "X" / "Y" / "Z" / "0" / "1" /
              "2" / "3" / "4" / "5" / "6" / "7" / "8" /
              "9" / "-" / "_" / "." / "!" / "~" / "*" /
              "'" / "(" / ")"
              ; case-insensitive
             
pct-encode  = utf-8-percent-encode(NOT no-encode)
; WITH \r\n, stray \r and stray \n represented as %0D%0D

unsafe-hh  = "%00" / "%01" / "%02" / "%03" / "%04" /
             "%05" / "%06" / "%07" / "%08" / "%0B" /
             "%0C" / "%0E" / "%0F" / "%10" / "%11" /
             "%12" / "%13" / "%14" / "%15" / "%16" /
             "%17" / "%18" / "%19" / "%1A" / "%1B" /
             "%1C" / "%1D" / "%1E" / "%1F"
             ; should be escaped to %25HH


subject-hfvalue = hfvalue with %0D and %0A stripped
; (That becomes the value of the Subject: fielder/header
; after it's percent-decoded)
                  
cc-hfvalue = hfvalue with  %0D and %0A stripped
; (That becomes the value of the Cc: field/header
; after it's percent-decoded)
                
bcc-hfvalue = hfvalue with  %0D and %0A stripped
; (That becomes teh value of the Bcc: field/header
; after it's percent-decoded)

body-hfvalue = hfvalue
; (That becomes the value of the Body: field/header
; after it's percent-decoded)

Note that I didn't mention addr-spec as it's my interpretation that mailto URIs don't contain addr-specs or groups. They contain percent-encoded values that represent them. (In the same way that Javascript URIs don't contain JS code. They just contain a percent-encoded string that represents it.)


Anyway, that's just meant to give an idea of what I mean.

Perhaps the spec's syntax section can be updated with a slightly more specific abnf and more details in the paragraphs below it.

Specifically, it would be great if the spec was directly, straightforward and specific and just said "Here is a list of all the characters that you don't have to percent-encode in mailto URI hfnames and hfvalues. Everything else, you must percent-encode.". That would be great.


-- 
Michael

Received on Wednesday, 11 March 2009 23:52:25 UTC