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

Re: Control characters in log message cause failure

From: <kfogel_at_collab.net>
Date: 2004-12-02 00:32:54 CET

"Peter N. Lundblad" <peter@famlundblad.se> writes:
> > Mark Benedetto King <mbk@lowlatency.com> writes:
> > > On Wed, Dec 01, 2004 at 02:08:34PM -0600, kfogel@collab.net wrote:
> > > What does the receiver do when it receives the message? How does it know
> > > which escaping mechanism to invert?
> >
> > Seriously, I've hand-waved on that detail. I was assuming could add
> > an encoding attribute (I think we do that already).
> >
> We use the DAV element comment (in the DAV namespace) for the log message.
> There is no encoding there, if we're talking about the XML used in the svn
> log command.

So the code should be:

   /* sending a log msg from server to client */

   if (is_valid_utf8 (msg) && svn_xml_is_xml_safe (msg))
     {
        send_message (escape_xml (msg));
     }
   else
     {
        send_message (fuzzy_escape (msg));
     }

then? (This assumes that fuzzy_escape() produces totally XML-kosher
data, naturally.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 2 00:37:30 2004

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.