[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: New entries file format.

From: <gstein_at_lyra.org>
Date: 2003-01-30 01:36:45 CET

On Mon, Jan 27, 2003 at 10:47:13PM -0800, Peter Davis wrote:
...
 On Monday 27 January 2003 21:43, cmpilato@collab.net wrote:
  Peter, it seems that what we need to escape in attributes is a
  superset of what needs to be escaped for CDATA.
 
  So rather than using two different escape routines, how about a flag
  to the escaper which sez use the extra attribute escaping rules,
  too?
 
 I thought of this, but of course it would require changing all the call
 points to use the additional attribute. No problem though.

Yup. Extra work. Personally, I'd prefer to see two functions. Since the
escaping code is iterating over (potentially) large chunks of individual
characters, it kind of sucks to perform the extra is_attribute check.

But that's my premature optimizer kicking in :-)

I also think these two calls are clearer:

    foo = escape_attribute(bar)
    foo = escape_cdata(bar)

than:

    foo = escape_xml(bar, TRUE)
    foo = escape_xml(bar, FALSE)

i.e. what the hell is that boolean? read read oh. all right.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:24:42 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.