Re: [Boost-bugs] [Boost C++ Libraries] #1038: "<" and ">" should be excaped in xml_oarchive

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1038: "<" and ">" should be excaped in xml_oarchive
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-12-04 10:36:30


#1038: "<" and ">" should be excaped in xml_oarchive
--------------------------------------+-------------------------------------
  Reporter: r.buergel_at_[hidden] | Owner: ramey
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: serialization
   Version: | Severity: Cosmetic
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Comment (by r.buergel_at_[hidden]):

 Ok, i looked it up in the XML specs ( http://www.w3.org/TR/2006/REC-xml-
 20060816/ ), what is valid xml and what not.

 <b class_id="1" class_name="B<int>" ...> is invalid, because the left
 angle bracket is forbidden in attribute values.
 The escaped variant <b class_id="1" class_name="B&lt;int&gt;" ...> is
 valid.


 The case you described above ( <B&lt;int&gt; ...>...</B&lt;int&gt;> ) is
 clearly invalid. But it didn't work before my patch and it doesn't work
 after applying it, because the xml_oarchive throws an exception, which
 states "Unrecognized XML Syntax".

 So, currently it is possible to write invalid xml with you archive without
 getting trapped. But reading that invalid xml-file causes the application
 to fail.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1038#comment:6>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC