Opened 11 years ago

#6180 new Patches

attributes string ascii escape "&#nn;" shouldn't throw exception

Reported by: kondo@… Owned by: Sebastian Redl
Milestone: To Be Determined Component: property_tree
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

In boost/property_tree/detail/rapidxml.hpp

At member function template

template<class StopPred, class StopPredPure, int Flags>
static Ch *skip_and_expand_character_refs(Ch *&text)

It supports escape "&amp;", "&quot;", "&gt;", "&lt;" and "&#nn;". (nn is number, xnn is also supported. When the member function template find the charactor '&' it starts parsing. And if it couldn't find the correct match, escape string is ignore and just copy '&' verbatim. But in the case of "&#nn", the error below would occur. And this error throw the parse_error exception.

BOOST_PROPERTY_TREE_RAPIDXML_PARSE_ERROR("expected ;", src);

I expect just ignore instead of the error. This behavior is same as other escape string's manner.

I attached patch. Could you check it?

Attachments (1)

rapidxml.hpp.patch (3.8 KB ) - added by kondo@… 11 years ago.

Download all attachments as: .zip

Change History (1)

by kondo@…, 11 years ago

Attachment: rapidxml.hpp.patch added
Note: See TracTickets for help on using tickets.