[Petal] [REQ] Escape HTML entities

Chris Croome chris at webarchitects.co.uk
Tue Aug 19 15:45:03 BST 2003


Hi

On Tue 19-Aug-2003 at 01:46:45PM +0100, Jean-Michel Hiver wrote:
> > - Case sensitivity, use lower case for XHTML 
> >   http://www.w3.org/TR/xhtml1/#h-4.12
> 
> There is no need to encode anything else than < > " and &
> in the output. I am not intending to have an output full of   and
> ©

Ummm, it's not refereing to _named_ entities but to _numeric_ ones,
are these also expanded?

  SGML and XML both permit references to characters by using
  hexadecimal values. In SGML these references could be made using
  either &#Xnn; or &#xnn;. In XML documents, you must use the
  lower-case version (i.e. &#xnn;)

  http://www.w3.org/TR/xhtml1/#h-4.12

In HTML it is OK to have uppercase numeric entities and XHTML it is
not.

> > - The named character reference ' (the apostrophe, U+0027) was
> >   introduced in XML 1.0 but does not appear in HTML. 
> >   http://www.w3.org/TR/xhtml1/#C_16
> 
> Doesn't matter - XML::Parser will expand it anyway since it's XML.

Fair enough, as long as this also happens whe Petal is doing HTML
since you can't use ' in HTML.

Chris

-- 
Chris Croome                               <chris at webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   


More information about the Petal mailing list