<br><tt><font size=2>Eric Blake <eblake@redhat.com> wrote on 09/27/2010
04:02:54 PM:<br>
<br>
</font></tt>
<br><tt><font size=2>> <br>
> On 09/27/2010 12:40 PM, Stefan Berger wrote:<br>
> > V2:<br>
> >   - introducing a field 'maxstrlen' to control the length
of accepted string<br>
> >   - removed function validating comment string assuming
the XML parser<br>
> >     already sinity checked the string<br>
> <br>
<br>
> > The patch below extends the XML parser and generator so that
every protocol<br>
> > now can have a comment node. Comments are limited to 256 characters
and are<br>
> > tested to only contain printable characters or spaces.<br>
> <br>
> Literal spaces, or generic blanks (space and tab for sure, but what
<br>
> about newline, not to mention vertical tab, form feed, ...), all of
<br>
> which are technically printable according to c_isprint()?</font></tt>
<br>
<br><tt><font size=2>I have been doing some testing using 'virsh nwfilter-edit'.
I edited a comment and put horizontal tabs into it or newlines or a combination
of both. Both of these seem to automatically be converted to space,  meaning
that when the XML is generated after the parsing, the tab or newline now
are shown as simple space. I also wrote the XML into a file using 'virsh
nwfilter-dumpxml', added a newline in the comment, ran unix2dos on it to
get '\r' and used 'virsh nwfilter-define' on it again, and the '\r' disappeared.
>From that I took that the XML parser does the correct replacement already
and I don't need to worry about it  -- assuming it would do the same
for vertical tab as well.</font></tt>
<br>
<br><tt><font size=2>   Stefan</font></tt>
<br><tt><font size=2><br>
> <br>
> -- <br>
> Eric Blake   eblake@redhat.com    +1-801-349-2682<br>
> Libvirt virtualization library </font></tt><a href=http://libvirt.org/><tt><font size=2>http://libvirt.org</font></tt></a><tt><font size=2><br>
</font></tt>