[Boost-bugs] [Boost C++ Libraries] #7519: newlines and tabs are not encoded when writing XML.

Subject: [Boost-bugs] [Boost C++ Libraries] #7519: newlines and tabs are not encoded when writing XML.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-17 14:20:28


#7519: newlines and tabs are not encoded when writing XML.
-------------------------------------------------------+--------------------
 Reporter: nicolas.cavallari@… | Owner: cornedbee
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
  Version: Boost Development Trunk | Severity: Problem
 Keywords: property_tree xml newline graphml |
-------------------------------------------------------+--------------------
 This XML file :
 {{{
 <?xml version="1.0" encoding="UTF-8"?>
 <somemoredata>hello&#9;world:&#10;Want something?</somemoredata>
 }}}

 Is properly parsed and somedata contains "hello\tworld\nWant something?",
 but this information is lost when writing:
 {{{
 <somemoredata>Hello world
 Want something?</somemoredata>
 }}}

 Reading that file will yield "Hello world Want something?", so the round
 trip ate these characters.
 Instead, write_xml should encode newlines and tabs according to
 http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping.

 Boost.Graph's write_graphml() and read_graphml() are also affected by this
 problem as they reuse property_tree. The attached patch fix the problem
 for both libraries.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7519>
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:50:10 UTC