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

Re: [PATCH] issue #2147 - v1

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-01-28 15:12:01 CET

VK Sameer wrote:
> Julian Foad wrote on 01/26/2005 08:37 AM:
>> Why does this return "const char *" when all the other
>> svn_xml_escape_... functions return void and append their output to a
>> stringbuf? (Not saying you necessarily should change it.)
> So that it can be chained in the caller. The intent was to match the
> existing call to apr_cml_quote_string.


>> "for (q = string; ...)" would be clearer.
> Hmm, I'm repeating the assignment later, for different reasons, though.
> This seems more consistent.

Well, it's a minor point. I don't mind much.

>> No. You should strip control characters before you XML-quote it,
>> otherwise you are relying on (1) your function producing validly
>> quoted XML (which it may do at present but is not documented to do), and
> I don't think I understood your point.
> Does apr_xml_quote_string require a validly-quoted XML string?
> Also, svn_xml_fuzzy_escape() does not do XML in the sense of quoting,
> unlike say svn_xml_escape_cdata().

I have responded in a separate e-mail.

>> (2) the XML-quoting function accepting and passing through control
>> characters (which such a function need not be expected to do).
> It does do it now, which is why there is a bug report filed :)
> Both the svn and apr functions seem to pass through bytes they are not
> looking for.

Yes, they do seem to, but you shouldn't rely on a function's undefined behaviour.

>>> +svn:log
>>> +V 37
>>> +this msg contains a Ctrl-T:  <- here
>> Eww. Is this likely to be preserved in people's editors? Perhaps you
>> could find a programmatic way of inserting it into the string without
>> it having to be a literal control character in the source file.
> OK, I did a quick search and didn't understand the Python code that
> showed up. Could somebody with Python experience help? Perl interpolates
> the value of a variable into a here document. How do I do that in Python?

Sorry, I don't have much Python experience. I could probably figure something
out by looking at existing code and the Python documentation, but I don't think
I could do that more quickly than you could.

- Julian

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 28 15:13:09 2005

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.