So We've Got Our HTML Escape Functions That Really Work In A C++ Manner, How To Do Unescape?
Here I've found a grate way to HTML encode/escape special chars. Now I wonder how to unescape HTML encoded text in C++? So codebase is: #include namespace xml {
Solution 1:
Take a look at how I've solved a similar problem for '&#(\d+);'
strings i.e., numeric character references (NCRs) using boost::spirit, boost::regex_token_iterator, Flex, Perl.
In your case the regex is &(amp|lt|gt);
if you don't need to convert all html entities.
Post a Comment for "So We've Got Our HTML Escape Functions That Really Work In A C++ Manner, How To Do Unescape?"