Ticket #4840: boost_property_tree_attribute_encoding_quote.patch
File boost_property_tree_attribute_encoding_quote.patch, 1.1 KB (added by , 12 years ago) |
---|
-
boost/property_tree/detail/xml_parser_write.hpp
88 88 } 89 89 } 90 90 } 91 92 91 93 92 94 // Write element 93 95 if (pt.data().empty() && pt.empty()) // Empty key … … 116 118 if (optional<const Ptree &> attribs = pt.get_child_optional(xmlattr<Ch>())) 117 119 for (It it = attribs.get().begin(); it != attribs.get().end(); ++it) 118 120 stream << Ch(' ') << it->first << Ch('=') << 119 Ch('"') << it->second.template get_value<std::basic_string<Ch> >() << Ch('"'); 121 Ch('"') << encode_char_entities( 122 it->second.template get_value<std::basic_string<Ch> >() 123 ) << Ch('"'); 120 124 125 126 121 127 if ( has_attrs_only ) 122 128 { 123 129 // Write closing brace