[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Escaping things in element names, fwd: [bruno@webarchitects.co.uk: Re: Fwd: [chris@webarchitects.co.uk: Re: XML message format draft]]



Hi

One the the guys I work with has pointed out that this is a valid
email header:

  X-_///<&;<<-\\\%: Hello World

I can see how to do this in XHTML for HTTP headers: 

  <meta 
    http-equiv="X-_///&lt;&amp;;&lt;&lt;-\\\%" 
    content="Hello World"
  />

I don't know how it would look as an element rather than an
attribute.

Chris

-- 
Chris Croome                               <chris@xxxxxxxxxxxxxxxxxxx>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   
everything else                               http://chris.croome.net/  
--- Begin Message ---
On Tue 11-Feb-2003 at 11:02:02AM +0000, Bruno Postle wrote:
> 
> This is the rfc: http://www.faqs.org/rfcs/rfc2822.html
> 
> 2.2. Header Fields
> 
>    Header fields are lines composed of a field name, followed by a colon
>    (":"), followed by a field body, and terminated by CRLF.  A field
>    name MUST be composed of printable US-ASCII characters (i.e.,
>    characters that have values between 33 and 126, inclusive), except
>    colon.  A field body may be composed of any US-ASCII characters,
>    except for CR and LF.  However, a field body may contain CRLF when
>    used in header "folding" and  "unfolding" as described in section
>    2.2.3.  All field bodies MUST conform to the syntax described in
>    sections 3 and 4 of this standard.

That means that both of these are perfectly valid email headers:

  Subject: Hello World

  X-_///<&;<<-\\\%: Hello World

-- 
Bruno

--- End Message ---